mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
A bit of backporting
It was added in 8.9 after all...
This commit is contained in:
7
types/node/v8/index.d.ts
vendored
7
types/node/v8/index.d.ts
vendored
@@ -116,12 +116,17 @@ interface NodeRequireFunction {
|
||||
}
|
||||
|
||||
interface NodeRequire extends NodeRequireFunction {
|
||||
resolve(id: string): string;
|
||||
resolve: RequireResolve;
|
||||
cache: any;
|
||||
extensions: NodeExtensions;
|
||||
main: NodeModule | undefined;
|
||||
}
|
||||
|
||||
interface RequireResolve {
|
||||
(id: string, options?: { paths: string[]; }): string;
|
||||
paths(request: string): string[];
|
||||
}
|
||||
|
||||
interface NodeExtensions {
|
||||
'.js': (m: NodeModule, filename: string) => any;
|
||||
'.json': (m: NodeModule, filename: string) => any;
|
||||
|
||||
Reference in New Issue
Block a user