[webpack-env] make __WebpackModuleApi.Module compatible with NodeJS.Module (#47516)

* fix: make __WebpackModuleApi.Module compatible with NodeJS.Module

* test: import node types in test

* test: use reference instead of import

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:
James C. Davis 2020-09-17 11:16:36 -04:00 committed by GitHub
parent 8ea3802414
commit 3dc75e301a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ declare namespace __WebpackModuleApi {
id: string;
filename: string;
loaded: boolean;
parent: NodeModule | null;
parent: NodeModule | null | undefined;
children: NodeModule[];
hot?: Hot;
}

View File

@ -1,4 +1,4 @@
/// <reference types="node"/>
interface SomeModule {
someMethod(): void;