type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { console.log(`[vite] server connection lost. polling for restart...`) setInterval(() => { fetch('/') .then(() => { location.reload() }) .catch((e) => { /* ignore */ }) }, 1000) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
() => { fetch('/') .then(() => { location.reload() }) .catch((e) => { /* ignore */ }) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
() => { location.reload() }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(e) => { /* ignore */ }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
() => { try { new CSSStyleSheet() return true } catch (e) {} return false }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(s: CSSStyleSheet) => s !== style
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(dep) => modulesToUpdate.add(dep)
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
({ deps }) => { return Array.isArray(deps) ? deps.some((dep) => modulesToUpdate.has(dep)) : modulesToUpdate.has(deps) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(dep) => modulesToUpdate.has(dep)
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
async (dep) => { const disposer = disposeMap.get(dep) if (disposer) await disposer(dataMap.get(dep)) try { const newMod = await import( dep + (dep.includes('?') ? '&' : '?') + `t=${timestamp}` ) moduleMap.set(dep, newMod) } catch (e) { warnFailedFetch(e...
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
() => { for (const { deps, fn } of callbacks) { if (Array.isArray(deps)) { fn(deps.map((dep) => moduleMap.get(dep))) } else { fn(moduleMap.get(deps)) } } console.log(`[vite]: js module hot updated: `, id) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(dep) => moduleMap.get(dep)
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(id: string) => { if (!dataMap.has(id)) { dataMap.set(id, {}) } // when a file is hot updated, a new context is created // clear its stale callbacks const mod = hotModulesMap.get(id) if (mod) { mod.callbacks = [] } const hot = { get data() { return dataMap.get(id) }, accept...
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(r) => { const channel = new MessageChannel() channel.port1.onmessage = (e) => { if (e.data.busted) r() } sw.postMessage( { type: 'bust-cache', path: `${location.protocol}//${location.host}${path}` }, [channel.port2] ) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ArrowFunction
(e) => { if (e.data.busted) r() }
MarvinRudolph/vite
src/client/client.ts
TypeScript
InterfaceDeclaration
interface HotModule { id: string callbacks: HotCallback[] }
MarvinRudolph/vite
src/client/client.ts
TypeScript
InterfaceDeclaration
interface HotCallback { deps: string | string[] fn: (modules: object | object[]) => void }
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
accept(callback: HotCallback['fn'] = () => {}) { hot.acceptDeps(id, callback) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
acceptDeps( deps: HotCallback['deps'], callback: HotCallback['fn'] = () => {} ) { const mod: HotModule = hotModulesMap.get(id) || { id, callbacks: [] } mod.callbacks.push({ deps: deps as HotCallback['deps'], fn: callback }) hotModulesMap.set...
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
dispose(cb: (data: any) => void) { disposeMap.set(id, cb) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
// noop, used for static analysis only decline() {}
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
invalidate() { location.reload() }
MarvinRudolph/vite
src/client/client.ts
TypeScript
MethodDeclaration
// custom events on(event: string, cb: () => void) { const existing = customUpdateMap.get(event) || [] existing.push(cb) customUpdateMap.set(event, existing) }
MarvinRudolph/vite
src/client/client.ts
TypeScript
ClassDeclaration
@Entity() export class User{ @PrimaryGeneratedColumn() id: number; @Column({ length: 100 }) displayName: String; @Column({ length: 100 }) email: String; @Column({ length: 200 }) password: String; @Column({ length: 500 }) image: String; @Column() isAdmin: Boolean; }
ptissera/checkinall
server-nest-mysql/src/users/entities/user.entity.ts
TypeScript
FunctionDeclaration
export default function findRowKeys(rows: any[], rowKey: RowKeyType, expanded?: boolean): any[];
koenw/fullstack-hello
frontend/node_modules/.pnpm/rsuite-table@5.2.0_9bdd65c2b60ce8638444b80b396a481b/node_modules/rsuite-table/es/utils/findRowKeys.d.ts
TypeScript
ArrowFunction
() => { let component: RecentFilesComponent; let fixture: ComponentFixture<RecentFilesComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ RecentFilesComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(RecentF...
max-geller/Moodl.io
apps/support/src/app/client/components/widgets/recent-files/recent-files.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ RecentFilesComponent ] }) .compileComponents(); }
max-geller/Moodl.io
apps/support/src/app/client/components/widgets/recent-files/recent-files.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(RecentFilesComponent); component = fixture.componentInstance; fixture.detectChanges(); }
max-geller/Moodl.io
apps/support/src/app/client/components/widgets/recent-files/recent-files.component.spec.ts
TypeScript
FunctionDeclaration
export function helmReleaseReducer(state = defaultState, action) { switch (action.type) { case UPDATE_HELM_RELEASE: return { ...state, }; } }
HCL-Cloud-Native-Labs/stratos
src/frontend/packages/kubernetes/src/kubernetes/workloads/store/workloads.reducers.ts
TypeScript
FunctionDeclaration
export function loadMoreResults(state: State): ThunkAction<Promise<void>, any, {}, Action> { const { location, related_files, status } = state if (status === Status.NoSearch || !location) { console.error("unable to load more results: bad search state") return () => Promise.resolve() } return async (dis...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
FunctionDeclaration
export function openFile( state: State, appPath: string, filename: string, line: number, file_rank: number, block_rank?: number, ): ThunkAction<Promise<void>, any, {}, Action> { return (dispatch) => { const request: OpenFileRequest = { path: appPath, filename: filename, line, ...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
FunctionDeclaration
export function reloadSearch(state: State): ThunkAction<void, {}, {}, Action> { const { location, status } = state if (status === Status.NoSearch || !location) { console.error("unable to reload search: bad search state") return () => Promise.resolve() } return relatedCodeEvent({ editor: state.edito...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
FunctionDeclaration
function requestRelated(location: Location, offset: number, editor: string, dispatch: ThunkDispatch<any, {}, Action>): Promise<void> { let request: FetchRequest = { ...LoadResultsParams, location, offset, editor, } return dispatch(POST({ url: "/codenav/related", options: { body: JSO...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
FunctionDeclaration
export function relatedCodeEvent(push: Push): ThunkAction<void, {}, {}, Action> { return (dispatch) => { // Push the loading state dispatch({ type: ActionType.NewSearch, data: push, }) // Fetch initial results and update state requestRelated(push.location, 0, push.editor, dispatch) ...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
FunctionDeclaration
export function reducer(state: State = defaultState, action: Action): any { switch (action.type) { case ActionType.Error: console.error("related code error:", action.data) return { ...state, error: action.data, status: Status.Error, } case ActionType.LoadResults: ...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
() => Promise.resolve()
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
async (dispatch): Promise<void> => { return requestRelated(location, related_files.length, state.editor, dispatch) }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
(dispatch) => { const request: OpenFileRequest = { path: appPath, filename: filename, line, block_rank, file_rank, } return dispatch(POST({ url: "/clientapi/plugins/" + state.editor + "/open", options: { body: JSON.stringify(request), }, })).then(...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
({ success, error }: any) => { if (!success && error) { throw new Error(error) } }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
({ success, data, status, error }: any) => { if (success) { dispatch({ type: ActionType.LoadResults, data: JSON.parse(data), }) } else if (status === 405) { dispatch({ type: ActionType.Stale, }) } else { dispatch({ type: ...
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
(dispatch) => { // Push the loading state dispatch({ type: ActionType.NewSearch, data: push, }) // Fetch initial results and update state requestRelated(push.location, 0, push.editor, dispatch) }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
InterfaceDeclaration
interface ErrorAction extends BaseAction { type: ActionType.Error data: string }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
InterfaceDeclaration
interface LoadResultsAction extends BaseAction { type: ActionType.LoadResults data: FetchResponse }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
InterfaceDeclaration
interface NewSearchAction extends BaseAction { type: ActionType.NewSearch data: Push }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
InterfaceDeclaration
interface StaleAction extends BaseAction { type: ActionType.Stale }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
InterfaceDeclaration
export interface State { status: Status, editor: string, editor_install_path: string, error: string, project_tag: string, project_root: string, location?: Location, relative_filename: string, relative_path: string, filename: string, related_files: RelatedFile[], }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
EnumDeclaration
enum ActionType { Error = "relatedcode.error", LoadResults = "relatedcode.loadresults", NewSearch = "relatedcode.newsearch", Stale = "relatedcode.stale", }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
EnumDeclaration
export enum Status { NoSearch = "NoSearch", Loading = "Loading", Loaded = "Loaded", NoMoreResults = "NoMoreResults", Stale = "Stale", Error = "Error" }
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
TypeAliasDeclaration
type Action = ErrorAction | LoadResultsAction | NewSearchAction | StaleAction
kiteco/kiteco-public
sidebar/src/store/related-code/related-code.tsx
TypeScript
ArrowFunction
() => { let component: HardwareItemComponent; let fixture: ComponentFixture<HardwareItemComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ HardwareItemComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(Hard...
ManishLade/cableapp
src/app/layout/manage-item/item-opening/item-opening.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ HardwareItemComponent ] }) .compileComponents(); }
ManishLade/cableapp
src/app/layout/manage-item/item-opening/item-opening.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(HardwareItemComponent); component = fixture.componentInstance; fixture.detectChanges(); }
ManishLade/cableapp
src/app/layout/manage-item/item-opening/item-opening.component.spec.ts
TypeScript
ArrowFunction
props => { return ( <Select<SelectOption> value={helpers.stringToSelectOpt(props.value)} options={[ { label: NodeLifecycle.SPOT, value: NodeLifecycle.SPOT }, { label: NodeLifecycle.ON_DEMAND, value: NodeLifecycle.ON_DEMAND }, ]} isClearable onChange={option
alienrobotwizard/flotilla-os
ui/src/components/NodeLifecycleSelect.tsx
TypeScript
FunctionDeclaration
// === async function test(enable: boolean, name: string, fun: () => void, duration = 1000) { if (!enable) return console.group(name) fun() await new Promise((resolve, reject) => { setTimeout(() => resolve(true), duration) }) console.log(`test end (${name})`) console.groupEnd() return }
alibaba/spatial-data-vis-framework
packages/polaris/polaris-three/examples/index.ts
TypeScript
ArrowFunction
() => { const p = new PolarisThree({ container: document.querySelector('#container') as HTMLDivElement, background: 'transparent', // autoplay: false, }) p.setStatesCode('1|0.000000|0.000000|0.000000|0.74540|0.84000|17.77600') // p.addEventListener('viewChange', (e) => { // console.log(e) // }) globalT...
alibaba/spatial-data-vis-framework
packages/polaris/polaris-three/examples/index.ts
TypeScript
ArrowFunction
(resolve, reject) => { setTimeout(() => resolve(true), duration) }
alibaba/spatial-data-vis-framework
packages/polaris/polaris-three/examples/index.ts
TypeScript
ArrowFunction
() => resolve(true)
alibaba/spatial-data-vis-framework
packages/polaris/polaris-three/examples/index.ts
TypeScript
ArrowFunction
(binop: ad.Binary["binop"]) => ( v: VarAD, w: VarAD ): ad.Binary => ({ tag: "Binary", binop, i: count++, left: v, right: w })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
( v: VarAD, w: VarAD ): ad.Binary => ({ tag: "Binary", binop, i: count++, left: v, right: w })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
(op: ad.Nary["op"], bin: (v: VarAD, w: VarAD) => ad.Binary) => ( xs: VarAD[] ): VarAD => { // interestingly, special-casing 1 and 2 args like this actually affects the // gradient by a nontrivial amount in some cases switch (xs.length) { case 1: { return xs[0]; } case 2: { return bin(xs...
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
( xs: VarAD[] ): VarAD => { // interestingly, special-casing 1 and 2 args like this actually affects the // gradient by a nontrivial amount in some cases switch (xs.length) { case 1: { return xs[0]; } case 2: { return bin(xs[0], xs[1]); } default: { return { tag: "Nary", i...
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
(y: VarAD, x: VarAD): ad.Binary => ({ tag: "Binary", i: count++, binop: "atan2", left: y, right: x, })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
(unop: ad.Unary["unop"]) => (v: VarAD): ad.Unary => ({ tag: "Unary", i: count++, unop, param: v, })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
(v: VarAD): ad.Unary => ({ tag: "Unary", i: count++, unop, param: v, })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
(cond: VarAD, v: VarAD, w: VarAD): ad.Ternary => ({ tag: "Ternary", i: count++, cond, then: v, els: w, })
cmumatt/penrose
packages/core/src/engine/AutodiffFunctions.ts
TypeScript
ArrowFunction
() => server.listen({ onUnhandledRequest: "error" })
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
() => server.close()
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
async (t) => { const repositoryResponse = createRepositoryResponse(); const pagedResponses = createQueryResponsePages({ numPages: 2, numDocsPerPage: 2, }); const allDocs = pagedResponses.flatMap((page) => page.results); const allDocumentIds = allDocs.map((doc) => doc.id); server.use( createMockRepository...
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
(page) => page.results
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
(doc) => doc.id
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
(id) => `"${id}"`
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
ArrowFunction
async (t) => { const params: prismic.BuildQueryURLArgs = { accessToken: "custom-accessToken", ref: "custom-ref", lang: "*", }; const pagedResponses = createQueryResponsePages({ numPages: 3, numDocsPerPage: 3, }); const allDocs = pagedResponses.flatMap((page) => page.results); const allDocumentIds = all...
AriFreyr/prismic-client
test/client-getAllByIDs.test.ts
TypeScript
InterfaceDeclaration
export interface RevisionContract { apiId: string; /** * Example: "1" */ apiRevision: string; /** * Example: "2016-12-01T19:30:35.763" */ createdDateTime: string; /** * Example: "2016-12-01T19:30:35.763" */ updatedDateTime: string; description: string; ...
191540/api-management-developer-portal
src/contracts/revision.ts
TypeScript
FunctionDeclaration
function getResourceInfo(path: string): File | null;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function setConfigURL(url: string, root: string): void;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function profile(): void;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function setUpgradeGuideLevel(level: "warning" | "silent"): void;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function isSupport(resource: ResourceInfo): Processor;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function map(type: string, processor: Processor): void;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function getRelativePath(url: string, file: string): string;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function convertToResItem(r: ResourceInfo): ResourceItem;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Conduct mapping injection with class definition as the value. * @param type Injection type. * @param analyzerClass Injection type classes need to be resolved. * @version Egret 2.4 * @platform Web,Native * @includeExample extension/resource/Resource.ts * @language en_US */ /...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Load configuration file and parse. * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 加载配置文件并解析。 * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language zh_CN */ function loadConfig(ur...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Load a set of resources according to the group name. * @param name Group name to load the resource group. * @param priority Load priority can be negative, the default value is 0. * <br>A low priority group must wait for the high priority group to complete the end of the load to start, and the ...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Check whether a resource group has been loaded. * @param name Group name。 * @returns Is loading or not. * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 检查某个资源组是否已经加载完成。 * @param name 组名。 * @returns 是否正在加载。 ...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * A list of groups of loading is obtained according to the group name. * @param name Group name. * @returns The resource item array of group. * @see RES.ResourceItem * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 根据组名...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Create a custom load resource group, note that this method is valid only after the resource configuration file is loaded. * <br>You can monitor the ResourceEvent.CONFIG_COMPLETE event to verify that the configuration is complete. * @param name Group name to create the load resource group. * @p...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Check whether the configuration file contains the specified resources. * @param key A sbuKeys attribute or name property in a configuration file. * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 检查配置文件里是否含有指定的资源。 * @param ...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * The synchronization method for obtaining the cache has been loaded with the success of the resource. * <br>The type of resource and the corresponding return value types are as follows: * <br>RES.ResourceItem.TYPE_BIN : ArrayBuffer JavaScript primary object * <br>RES.ResourceItem.TYPE_IMAGE : i...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Asynchronous mode to get the resources in the configuration. As long as the resources exist in the configuration file, you can get it in an asynchronous way. * @param key A sbuKeys attribute or name property in a configuration file. * @param compFunc Call back function. Example:compFunc(data,key):v...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
function getResAsync(key: string, compFunc: GetResAsyncCallback, thisObject: any): void;
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Access to external resources through the full URL. * @param url The external path to load the file. * @param compFunc Call back function. Example:compFunc(data,url):void。 * @param thisObject This pointer of call back function. * @param type File type (optional). Use the static constants d...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Destroy a single resource file or a set of resources to the cache data, to return whether to delete success. * @param name Name attribute or resource group name of the load item in the configuration file. * @param force Destruction of a resource group when the other resources groups have the same r...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Sets the maximum number of concurrent load threads, the default value is 2. * @param thread The number of concurrent loads to be set. * @see #setMaxRetryTimes * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 设置最大并发加载线程数量,默认值是 2。 * @param thread 要设...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Sets the number of retry times when the resource failed to load, and the default value is 3. * @param retry To set the retry count. * @includeExample extension/resource/Resource.ts * @version Egret 2.4 * @platform Web,Native * @language en_US */ /** * 设置资源加载失败时的重试次数,默认值是 3。...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Add event listeners, reference ResourceEvent defined constants. * @param type Event name。 * @param listener Listener functions for handling events. This function must accept the Event object as its only parameter, and can't return any results, * As shown in the following example: function (evt...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Remove event listeners, reference ResourceEvent defined constants. * @param type Event name。 * @param listener Listening function。 * @param thisObject The this object that is bound to a function. * @param useCapture Is used to capture, and this property is only valid in the display list. ...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
FunctionDeclaration
/** * Adding a custom resource configuration. * @param data To add configuration. * @version Egret 3.1.6 * @platform Web,Native * @language en_US */ /** * 自定义添加一项资源配置。 * @param data 要添加的配置。 * @version Egret 3.1.6 * @platform Web,Native * @language zh_CN */ fun...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
ClassDeclaration
/** * @class RES.ResourceConfig * @classdesc * @private */ class ResourceConfig { config: Data; constructor(); init(): Promise<void>; __temp__get__type__via__url(url_or_alias: string): string; getKeyByAlias(aliasName: string): string; /** * 创建...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript
ClassDeclaration
/** * @class RES.ResourceLoader * @classdesc * @private */ class ResourceLoader { /** * 当前组加载的项总个数,key为groupName */ private groupTotalDic; /** * 已经加载的项个数,key为groupName */ private numLoadedDic; /** * 正在加载的组列表,key为gro...
SixiMeatballs/EgretGame
Demos/p2demo/libs/modules/assetsmanager/assetsmanager.d.ts
TypeScript