mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* adding types for little-loader * adding support files * use 4 spaces * export directly * export default? * I'm so confused. * going back to original. giving up. * missing version and ; * trying to just export a function one more time... * remove export? * *sigh* * updating import on test * context is optional * update to deal with options case. * remove unnecessary generic?
24 lines
589 B
TypeScript
24 lines
589 B
TypeScript
// Type definitions for little-loader 0.2
|
|
// Project: https://github.com/walmartlabs/little-loader
|
|
// Definitions by: Chris Drackett <https://github.com/chrisdrackett>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
interface Options {
|
|
context?: any;
|
|
setup?: (this: any, script: any) => void;
|
|
callback?: (this: any, err: string) => void;
|
|
}
|
|
|
|
declare function loader(
|
|
module: string,
|
|
callback?: (this: any, err: string) => void,
|
|
context?: any
|
|
): void;
|
|
|
|
declare function loader(
|
|
module: string,
|
|
options?: Options
|
|
): void;
|
|
|
|
export = loader;
|