mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
A bit of backporting
It was added in 8.9 after all...
This commit is contained in:
Vendored
+6
-1
@@ -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