diff --git a/types/react-loadable/index.d.ts b/types/react-loadable/index.d.ts index bf8af8e794..8661716e75 100644 --- a/types/react-loadable/index.d.ts +++ b/types/react-loadable/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-loadable 5.4 +// Type definitions for react-loadable 5.5 // Project: https://github.com/thejameskyle/react-loadable#readme // Definitions by: Jessica Franco // Oden S. diff --git a/types/react-loadable/test/webpack.ts b/types/react-loadable/test/webpack.ts index c6c95f8af0..4ce672e49f 100644 --- a/types/react-loadable/test/webpack.ts +++ b/types/react-loadable/test/webpack.ts @@ -13,7 +13,7 @@ const config: webpack.Configuration = { const manifest = { react: [ { - id: 0, + id: './node_modules/react/index.js', name: './node_modules/react/index.js', file: 'main.js', publicPath: 'http://127.0.0.1/main.js' diff --git a/types/react-loadable/webpack.d.ts b/types/react-loadable/webpack.d.ts index 59e046a975..35c8e44aad 100644 --- a/types/react-loadable/webpack.d.ts +++ b/types/react-loadable/webpack.d.ts @@ -1,31 +1,22 @@ -import webpack = require("webpack"); +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; +export interface Bundle { + id: string; + name: string | null; 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 interface Manifest { + [moduleId: string]: Bundle[]; +} -export = exports; +export interface ReactLoadablePluginOptions { + filename: string; +} + +export class ReactLoadablePlugin extends webpack.Plugin { + constructor(opts?: ReactLoadablePluginOptions); +} + +export function getBundles(manifest: Manifest, moduleIds: string[]): Bundle[];