type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
// note: don’t claim .astro files with resolveId() — it prevents Vite from transpiling the final JS (import.meta.globEager, etc.) async resolveId(id, from) { // If resolving from an astro subresource such as a hoisted script, // we need to resolve relative paths ourselves. if (from) { const parsedFrom = pa...
natemoo-re/astro
packages/astro/src/vite-plugin-astro/index.ts
TypeScript
MethodDeclaration
async load(this: PluginContext, id, opts) { const parsedId = parseAstroRequest(id); const query = parsedId.query; if (!id.endsWith('.astro') && !query.astro) { return null; } const filename = normalizeFilename(parsedId.filename); const fileUrl = new URL(`file://${filename}`); let source = awa...
natemoo-re/astro
packages/astro/src/vite-plugin-astro/index.ts
TypeScript
MethodDeclaration
async handleHotUpdate(context) { if (context.server.config.isProduction) return; return handleHotUpdate.call(this, context, config, logging); }
natemoo-re/astro
packages/astro/src/vite-plugin-astro/index.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-task', template: ` <div class="list-item {{ task?.state }}"> <label class="checkbox"> <input type="checkbox" [defaultChecked]="task?.state === 'TASK_ARCHIVED'" disabled="true" name="checked" /> ...
ser14joker/storybook-angular-example
src/app/components/task.component.ts
TypeScript
MethodDeclaration
/** * Component method to trigger the onPin event * @param id string */ onPin(id: any) { this.onPinTask.emit(id); }
ser14joker/storybook-angular-example
src/app/components/task.component.ts
TypeScript
MethodDeclaration
/** * Component method to trigger the onArchive event * @param id string */ onArchive(id: any) { this.onArchiveTask.emit(id); }
ser14joker/storybook-angular-example
src/app/components/task.component.ts
TypeScript
FunctionDeclaration
function titleFromFile(c :Config, file :string, name :string) :string { let title = name if (title == "index") { let parent = Path.dir(file) if (parent == c.srcdirAbs) { return "Home" } else { title = Path.base(parent) } } // "foo-bar.baz" -> "Foo bar baz" return title[0].toUpperC...
rsms/wgen
src/page.ts
TypeScript
FunctionDeclaration
// The most minimal structured page is 8 bytes: //---\n //---\n function hasMoreToRead(s :ReadState) :bool { return s.buf.length >= HEADER_READ_SIZE && s.buf.length % HEADER_READ_SIZE == 0 }
rsms/wgen
src/page.ts
TypeScript
FunctionDeclaration
function fread(fd :number, buf :Buffer, offs :int) :Promise<int> { // dlog(`fread len=${buf.length - offs} from fd=${fd} into buf[${offs}]`) return fs.read(fd, buf, offs, buf.length - offs, null).then(r => r.bytesRead) }
rsms/wgen
src/page.ts
TypeScript
FunctionDeclaration
function freadSync(fd :number, buf :Buffer, offs :int, len :int) :int { // dlog(`freadSync len=${buf.length - offs} from fd=${fd} into buf[${offs}]`) return fs.readSync(fd, buf, offs, len, null) }
rsms/wgen
src/page.ts
TypeScript
FunctionDeclaration
async function readHeader(c :Config, fd :number, file :string) :Promise<ReadState> { let buf = Buffer.allocUnsafe(HEADER_READ_SIZE) let len = await fread(fd, buf, 0) let nread = HEADER_READ_SIZE let fm :FrontMatter|null = null let fmend = -1 if (len > 7) { // The most minimal magic page is 8 bytes let...
rsms/wgen
src/page.ts
TypeScript
ArrowFunction
r => r.bytesRead
rsms/wgen
src/page.ts
TypeScript
ArrowFunction
()=>c.relpath(file)
rsms/wgen
src/page.ts
TypeScript
ClassDeclaration
export default class Page { // internal _s :ReadState parent :Page|null = null children :Page[] = [] constructor( public title :string, public sfile :string, // source filename (absolute path) public sext :string, // source file extension, e.g. ".md" public ofile :string, // output fi...
rsms/wgen
src/page.ts
TypeScript
InterfaceDeclaration
interface ReadState { fd :number // source file read FD. -1 when invalid buf :Buffer fm :FrontMatter|null fmEndOffs :number // offset in buf where front matter ends, -1 if no front matter }
rsms/wgen
src/page.ts
TypeScript
MethodDeclaration
toString() :string { return `Page(${this.title})` }
rsms/wgen
src/page.ts
TypeScript
MethodDeclaration
// NOTE: Any properties in Page objects are visible within templates. // For this reason, helper functions like readAll are not part of the prototype. // readAll reads the complete page source // static readAll(p :Page) :Buffer { let buf = p._s.buf let hasMore = buf.length >= HEADER_READ_SIZE && buf.length % HE...
rsms/wgen
src/page.ts
TypeScript
MethodDeclaration
static async read(c :Config, file :string, sext :string) :Promise<Page> { // dlog(`Page.read ${file}`) let fd = fs.openSync(file, "r") try { let _s = await readHeader(c, fd, file) let fm = _s.fm ; _s.fm = null let file_noext = file.substr(0, file.length - sext.length) // a/b.md -> a/b ...
rsms/wgen
src/page.ts
TypeScript
ArrowFunction
() => { let service: MoedaService; beforeEach(() => { TestBed.configureTestingModule({}); service = TestBed.inject(MoedaService); }); it('should be created', () => { expect(service).toBeTruthy(); }); }
Brunocs1991/Udemy_Angula_13
projet-final/src/app/conversor/services/moeda.service.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({}); service = TestBed.inject(MoedaService); }
Brunocs1991/Udemy_Angula_13
projet-final/src/app/conversor/services/moeda.service.spec.ts
TypeScript
ArrowFunction
(theme: Theme) => createStyles({ root: { display: "flex", }, drawer: { [theme.breakpoints.up("sm")]: { width: drawerWidth, flexShrink: 0, }, }, onlyMobile: { [theme.breakpoints.up("md")]: { ...
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { (async () => { if (photos.length === 0) setAutocompleteOptions([]); else setAutocompleteOptions((await getPhotoLabels(photos.map((photo) => photo.id))).data); })(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { if (photos.length === 0) setAutocompleteOptions([]); else setAutocompleteOptions((await getPhotoLabels(photos.map((photo) => photo.id))).data); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(photo) => photo.id
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { upload(acceptedFiles, fileRejections); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { setShowLoadingBar(true); const resp = await getPhotosInAlbum(id, searchTerm); if (resp.status === 200) { setPhotos(resp.data); setShowLoadingBar(false); } else { window.alert(await resp.data); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { const resp = await getAlbums(""); if (resp.status === 200) { setAlbums(resp.data); } else { window.alert(await resp.data); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { fetchPhotos(); fetchAlbums(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (albumIds: string[]) => { topBarButtonFunctions.unselect(); await addPhotosToAlbums(selected, albumIds, enqueueSnackbar, closeSnackbar); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (labels: any) => { topBarButtonFunctions.unselect(); await addLabel(selected, labels); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (pid: string) => { setPhotos(photos.filter((p) => p.id !== pid)); await deletePhotos([pid], enqueueSnackbar, closeSnackbar); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(p) => p.id !== pid
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (pid: string) => { setPhotos(photos.filter((p) => p.id !== pid)); await removePhotosFromAlbum([pid], id, enqueueSnackbar, closeSnackbar); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (files: File[], fileRejections: FileRejection[]) => { if (!files) return; const formData = new FormData(); files.forEach((file) => { if (file.size > maxSize) { fileRejections.push({ file, errors: [{ message: `File is bigger than ${maxSize / (1024 * 1024 * 1024...
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(file) => { if (file.size > maxSize) { fileRejections.push({ file, errors: [{ message: `File is bigger than ${maxSize / (1024 * 1024 * 1024)} GB`, code: "file-too-large" }] }); } else { formData.append("file", file); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(photoId: string) => () => { if (anySelected()) { clickHandler(photoId)(); } else { history.push(`/albums/open/${id}/view/${photoId}`); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { if (anySelected()) { clickHandler(photoId)(); } else { history.push(`/albums/open/${id}/view/${photoId}`); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(id: string) => () => { let copy = selected.slice(); if (copy.includes(id)) copy = copy.filter((v) => v !== id); else copy.push(id); setSelected(copy); if (copy.length === 0) { setSelectable(false); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { let copy = selected.slice(); if (copy.includes(id)) copy = copy.filter((v) => v !== id); else copy.push(id); setSelected(copy); if (copy.length === 0) { setSelectable(false); } }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(v) => v !== id
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(): boolean => { return selected.length !== 0 || selectable; }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (id: string) => { await deletePhoto(id); // await fetchPhotos(); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (id: string) => { await removePhoto(id); setPhotos(photos.filter((p) => p.id !== id)); // await fetchPhotos(); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(p) => p.id !== id
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(id: string) => { setSelected([id]); setAlbumDialogOpen(true); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (photoID: string) => { await setCover(id, photoID); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async (id: string) => { await download( photos.filter((photo) => id === photo.id), enqueueSnackbar, closeSnackbar ); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(photo) => id === photo.id
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { await setCover(id, selected[0]); topBarButtonFunctions.unselect(); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { topBarButtonFunctions.unselect(); await deletePhotos(selected, enqueueSnackbar, closeSnackbar); setPhotos(photos.filter((p) => !selected.includes(p.id))); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(p) => !selected.includes(p.id)
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { topBarButtonFunctions.unselect(); await removePhotosFromAlbum(selected, id, enqueueSnackbar, closeSnackbar); setPhotos(photos.filter((p) => !selected.includes(p.id))); await props.refresh(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { setSelected([]); setSelectable(false); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { openM(); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { //Nav to settings page }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { setSelectable(!selectable); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { setAlbumDialogOpen(true); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { setLabelDialogOpen(true); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { topBarButtonFunctions.unselect(); download( photos.filter((photo) => selected.includes(photo.id)), enqueueSnackbar, closeSnackbar ); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(photo) => selected.includes(photo.id)
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(s: string) => async () => { setSearchTerm(s); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
async () => { setSearchTerm(s); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
() => { setShowSearchBar(!showSearchBar); }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(id: string, buttonFunctions: any) => { return <TopRightBar id={id} buttonFunctions={buttonFunctions} />; }
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ArrowFunction
(album: AlbumT) => album.id.toString() === id
lezli01/ImageStore
frontend/src/Components/AlbumPage/AlbumPhotoPage/AlbumPhotoPage.tsx
TypeScript
ClassDeclaration
export class AppStartupBase implements Contracts.IAppStartup { public constructor(public appEvents: Contracts.IAppEvents[]) { } @Log() public async configuration(): Promise<void> { for (let appEvent of this.appEvents) { await appEvent.onAppStartup(); ...
Jaguel/bit-framework
src/TypeScriptClient/Bit.TSClient.Core/Implementations/appStartupBase.ts
TypeScript
MethodDeclaration
@Log() public async configuration(): Promise<void> { for (let appEvent of this.appEvents) { await appEvent.onAppStartup(); } }
Jaguel/bit-framework
src/TypeScriptClient/Bit.TSClient.Core/Implementations/appStartupBase.ts
TypeScript
FunctionDeclaration
function maybeSerializeListItem( item: ListItem | ListItemBuilder | Divider, index: number, path: SerializePath ): ListItem | Divider { if (item instanceof ListItemBuilder) { return item.serialize({path, index}) } const listItem = item as ListItem if (listItem && listItem.type === 'divider') { r...
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
FunctionDeclaration
function isPromise<T>(thing: any): thing is Promise<T> { return thing && typeof thing.then === 'function' }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
FunctionDeclaration
export function isList(list: Collection): list is List { return list.type === 'list' }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(thing: ListItem) => { if (thing instanceof ListBuilder) { return 'ListBuilder' } if (isPromise<ListItem>(thing)) { return 'Promise' } return Array.isArray(thing) ? 'array' : typeof thing }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(item: ListItem | Divider): item is ListItem => { return item.type === 'listItem' }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(intentName: string, params, context) => { const pane = context.pane as List const items = pane.items || [] return ( items .filter(isDocumentListItem) .some(item => item.schemaType.name === params.type && item._id === params.id) || shallowIntentChecker(intentName, params, context) ) }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
item => item.schemaType.name === params.type && item._id === params.id
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(itemId: string, options: ChildResolverOptions) => { const parentItem = options.parent as List const items = parentItem.items.filter(isListItem) const target = (items.find(item => item.id === itemId) || {child: undefined}).child if (!target || typeof target !== 'function') { return target } return ty...
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
item => item.id === itemId
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(item, index) => maybeSerializeListItem(item, index, path)
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
(val, i) => find(serializedItems, {id: val.id}, i + 1)
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
item => item.id
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ClassDeclaration
export class ListBuilder extends GenericListBuilder<BuildableList, ListBuilder> { protected spec: BuildableList constructor(spec?: ListInput) { super() this.spec = spec ? spec : {} this.initialValueTemplatesSpecified = Boolean(spec && spec.initialValueTemplates) } items(items: (ListItemBuilder | ...
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
InterfaceDeclaration
export interface List extends GenericList { items: (ListItem | Divider)[] }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
InterfaceDeclaration
export interface ListInput extends GenericListInput { items?: (ListItem | ListItemBuilder | Divider)[] }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
InterfaceDeclaration
export interface BuildableList extends BuildableGenericList { items?: (ListItem | ListItemBuilder | Divider)[] }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
MethodDeclaration
items(items: (ListItemBuilder | ListItem | Divider)[]): ListBuilder { return this.clone({items}) }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
MethodDeclaration
getItems() { return this.spec.items }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
MethodDeclaration
serialize(options: SerializeOptions = {path: []}): List { const id = this.spec.id if (typeof id !== 'string' || !id) { throw new SerializeError( '`id` is required for lists', options.path, options.index ).withHelpUrl(HELP_URL.ID_REQUIRED) } const items = typeof this...
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
MethodDeclaration
clone(withSpec?: BuildableList) { const builder = new ListBuilder() builder.spec = {...this.spec, ...(withSpec || {})} return builder }
AjDigitalDesign/portfoliov1
studio/node_modules/@sanity/structure/src/List.ts
TypeScript
ArrowFunction
() => { utils.logger(logGroup, 'ready'); this.sendEvent(); }
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
ClassDeclaration
class Nativo { call(): Promise<void> { if (!this.isEnabled()) { utils.logger(logGroup, 'disabled'); return Promise.resolve(); } return utils.scriptLoader .loadScript(libraryUrl, 'text/javascript', true, null, {}, { ntvSetNoAutoStart: '' }) .then(() => { utils.logger(logGroup, 'ready'); thi...
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
MethodDeclaration
call(): Promise<void> { if (!this.isEnabled()) { utils.logger(logGroup, 'disabled'); return Promise.resolve(); } return utils.scriptLoader .loadScript(libraryUrl, 'text/javascript', true, null, {}, { ntvSetNoAutoStart: '' }) .then(() => { utils.logger(logGroup, 'ready'); this.sendEvent(); ...
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
MethodDeclaration
start(): void { this.displayTestAd(); }
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
MethodDeclaration
private sendEvent(): void { communicationService.dispatch(nativoLoadedEvent({ isLoaded: true })); }
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
MethodDeclaration
private isEnabled(): boolean { return context.get('services.nativo.enabled') && context.get('wiki.opts.enableNativeAds'); }
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
MethodDeclaration
private displayTestAd(): void { if (utils.queryString.get('native_ads_test') !== '1') { return; } const nativeAdIncontentPlaceholder = document.getElementById('ntv-ad'); nativeAdIncontentPlaceholder.innerHTML = `<div class="ntv-wrapper"> <img src="https://placekitten.com/100/100" alt="mr...
Wikia/ad-engine
src/ad-services/nativo/index.ts
TypeScript
FunctionDeclaration
export async function on_get_plots(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, get_plots_command, TGetPlotsBroadCast>) => unknown){ await daemon.subscribe(wallet_ui_service); const messageListener = (e: WsMessage) => { if(e.origin === chia_harvester_service && e.command === get_plots_...
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript
FunctionDeclaration
export async function on_message_from_harvester(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, chia_harvester_commands, TChiaHarvesterBroadcast>) => unknown){ await daemon.subscribe(wallet_ui_service); const messageListener = (e: WsMessage) => { if(e.origin === chia_harvester_service){ ...
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript
ArrowFunction
(e: WsMessage) => { if(e.origin === chia_harvester_service && e.command === get_plots_command){ callback(e); } }
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript
ArrowFunction
(e: WsMessage) => { if(e.origin === chia_harvester_service){ callback(e); } }
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript
TypeAliasDeclaration
export type chia_harvester_service = typeof chia_harvester_service;
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript
TypeAliasDeclaration
export type get_plots_command = typeof get_plots_command;
1Megu/chia-agent
src/api/ws/harvester/index.ts
TypeScript