webpack.d.ts 665 B

1234567891011121314151617181920212223242526272829303132
  1. interface WebpackRequireEnsureCallback {
  2. (req: WebpackRequire): void;
  3. }
  4. interface WebpackRequire {
  5. (id: string): any;
  6. (paths: string[], callback: (...modules: any[]) => void): void;
  7. ensure(
  8. ids: string[],
  9. callback: WebpackRequireEnsureCallback,
  10. chunkName?: string
  11. ): Promise<void>;
  12. context(directory: string, useSubDirectories?: boolean, regExp?: RegExp): WebpackContext;
  13. }
  14. interface WebpackContext extends WebpackRequire {
  15. keys(): string[];
  16. }
  17. declare const require: WebpackRequire;
  18. // Loaders
  19. declare module '!file-loader!*' {
  20. const content: string;
  21. export = content;
  22. }
  23. declare module '*.json' {
  24. const content: any;
  25. export default content;
  26. }