mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
Fix return type of ready() function
This commit is contained in:
2
types/loadjs/index.d.ts
vendored
2
types/loadjs/index.d.ts
vendored
@@ -27,7 +27,7 @@ declare namespace loadjs {
|
||||
error?(depsNotFound: string): void;
|
||||
}
|
||||
|
||||
function ready(bundleIds: string | string[], optionsOrCallback: ReadyOptions | LoadedFn): void;
|
||||
function ready(bundleIds: string | string[], optionsOrCallback: ReadyOptions | LoadedFn): typeof loadjs;
|
||||
function isDefined(bundleId: string): boolean;
|
||||
function done(bundleId: string): void;
|
||||
function reset(): void;
|
||||
|
||||
@@ -16,8 +16,8 @@ const readyOptions: importedLoadJs.ReadyOptions = {
|
||||
importedLoadJs('/path/to/foo.js', () => {});
|
||||
importedLoadJs(['/path/to/foo.js', '/path/to/bar.js'], () => {});
|
||||
importedLoadJs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar');
|
||||
importedLoadJs.ready('foobar', () => {});
|
||||
importedLoadJs.ready(['foo', 'bar'], () => {});
|
||||
importedLoadJs.ready('foobar', () => {}).ready('foobar', () => {});
|
||||
importedLoadJs.ready(['foo', 'bar'], () => {}).ready(['foo', 'bar'], () => {});
|
||||
importedLoadJs.isDefined('foobar');
|
||||
importedLoadJs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar', loadOptions);
|
||||
importedLoadJs.ready('foobar', readyOptions);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
loadjs('/path/to/foo.js', () => {});
|
||||
loadjs(['/path/to/foo.js', '/path/to/bar.js'], () => {});
|
||||
loadjs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar');
|
||||
loadjs.ready('foobar', () => {});
|
||||
loadjs.ready(['foo', 'bar'], () => {});
|
||||
loadjs.ready('foobar', () => {}).ready('foobar', () => {});
|
||||
loadjs.ready(['foo', 'bar'], () => {}).ready(['foo', 'bar'], () => {});
|
||||
loadjs.isDefined('foobar');
|
||||
loadjs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar', {
|
||||
before: (path, scriptEl) => {},
|
||||
|
||||
Reference in New Issue
Block a user