DefinitelyTyped/types/node/module.d.ts
Gerhard Stöbich 5d72d52865 node: allow to augment class Module (#41571)
Add empty namespace Module to allow to augment static side of class Module.
2020-01-15 02:56:39 -05:00

22 lines
617 B
TypeScript

declare module "module" {
import { URL } from "url";
namespace Module {}
interface Module extends NodeModule {}
class Module {
static runMain(): void;
static wrap(code: string): string;
/**
* @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
*/
static createRequireFromPath(path: string): NodeRequire;
static createRequire(path: string | URL): NodeRequire;
static builtinModules: string[];
static Module: typeof Module;
constructor(id: string, parent?: Module);
}
export = Module;
}