DefinitelyTyped/types/react-loadable/webpack.d.ts
2018-12-25 12:01:53 +08:00

32 lines
615 B
TypeScript

import webpack = require("webpack");
declare namespace LoadableExport {
interface Options {
filename: string;
}
class ReactLoadablePlugin extends webpack.Plugin {
constructor(opts?: Options);
}
interface Bundle {
id: number;
name: string;
file: string;
publicPath: string;
}
interface Manifest {
[moduleId: string]: Bundle[];
}
function getBundles(manifest: Manifest, moduleIds: string[]): Bundle[];
}
declare const exports: {
getBundles: typeof LoadableExport.getBundles;
ReactLoadablePlugin: typeof LoadableExport.ReactLoadablePlugin;
};
export = exports;