DefinitelyTyped/types/react-loadable/webpack.d.ts
Ian Mobley 781b4af34b Convert to match commonJS export syntax.
I'm not entirely sure how to get the interfaces to export as well, but
they're not really necessary beside for checking sanity of arguments.
2018-04-02 09:06:19 -07:00

31 lines
591 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;
}
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;