Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Adding definition for require.context. #51

Merged
merged 2 commits into from
Sep 9, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/runtime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ interface WebpackRequire {
(id: string): any;
(paths: string[], callback: (...modules: any[]) => void): void;
ensure(ids: string[], callback: WebpackRequireEnsureCallback, chunkName?: string): void;
context(directory: string, useSubDirectories: boolean, regExp: RegExp): WebpackContext;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! Could you please make useSubDirectories and regExp optional? http://webpack.github.io/docs/context.html

}

interface WebpackContext extends WebpackRequire {
keys(): string[];
}

declare var require: WebpackRequire;