refactor: const Module = require('module') as NodeJS.ModuleInternal; (#38757)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
65901f4c6a
commit
e71a56d11e
8 changed files with 20 additions and 9 deletions
11
typings/internal-ambient.d.ts
vendored
11
typings/internal-ambient.d.ts
vendored
|
@ -3,6 +3,17 @@ declare const BUILDFLAG: (flag: boolean) => boolean;
|
|||
declare const ENABLE_VIEWS_API: boolean;
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface ModuleInternal extends NodeJS.Module {
|
||||
new(id: string, parent?: NodeJS.Module | null): NodeJS.Module;
|
||||
_load(request: string, parent?: NodeJS.Module | null, isMain?: boolean): any;
|
||||
_resolveFilename(request: string, parent?: NodeJS.Module | null, isMain?: boolean, options?: { paths: string[] }): string;
|
||||
_preloadModules(requests: string[]): void;
|
||||
_nodeModulePaths(from: string): string[];
|
||||
_extensions: Record<string, (module: NodeJS.Module, filename: string) => any>;
|
||||
_cache: Record<string, NodeJS.Module>;
|
||||
wrapper: [string, string];
|
||||
}
|
||||
|
||||
interface FeaturesBinding {
|
||||
isBuiltinSpellCheckerEnabled(): boolean;
|
||||
isPDFViewerEnabled(): boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue