DefinitelyTyped/types/little-loader/index.d.ts
Chris Drackett af9ceddfdf little-loader types (#36127)
* 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?
2019-06-24 13:00:42 -07:00

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;