Use NodeRequire as callback parameter type (#23254)

This commit is contained in:
Andy Patterson
2018-01-29 11:44:50 -08:00
committed by Sheetal Nandi
parent bb7103dc31
commit cedbc9ed4d
+1 -2
View File
@@ -31,8 +31,7 @@ declare namespace __WebpackModuleApi {
*
* This creates a chunk. The chunk can be named. If a chunk with this name already exists, the dependencies are merged into that chunk and that chunk is used.
*/
ensure(paths: string[], callback: (require: (id: string) => any) => void, chunkName?: string): void;
ensure(paths: string[], callback: (require: <T>(id: string) => T) => void, chunkName?: string): void;
ensure(paths: string[], callback: (require: NodeRequire) => void, chunkName?: string): void;
context(path: string, deep?: boolean, filter?: RegExp): RequireContext;
/**
* Returns the module id of a dependency. The call is sync. No request to the server is fired. The compiler ensures that the dependency is available.