mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
fix(45927): fix missing path for Module in v12 (#45940)
* fix(45927): fix missing `path` for Module in v12 This is an attempt to fix a problem reported in #45927 /cc @tk-1io Thanks! Fixes #45927 * Update types/node/v12/node-tests.ts thx to @Exe-Boss Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
This commit is contained in:
parent
28a932ba83
commit
181b253d3a
6
types/node/v12/globals.d.ts
vendored
6
types/node/v12/globals.d.ts
vendored
@ -1162,6 +1162,12 @@ declare namespace NodeJS {
|
||||
loaded: boolean;
|
||||
parent: Module | null;
|
||||
children: Module[];
|
||||
/**
|
||||
* @since 11.14.0
|
||||
*
|
||||
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
|
||||
*/
|
||||
path: string;
|
||||
paths: string[];
|
||||
|
||||
constructor(id: string, parent?: Module);
|
||||
|
||||
@ -764,6 +764,7 @@ import moduleModule = require('module');
|
||||
const m2: Module = new Module.Module("moduleId");
|
||||
const b: string[] = Module.builtinModules;
|
||||
let paths: string[] = module.paths;
|
||||
const path: string = module.path;
|
||||
paths = m1.paths;
|
||||
|
||||
const customRequire1 = moduleModule.createRequireFromPath('./test');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user