Skip to content

Commit 3c372cf

Browse files
committed
deprecate and scrary message for __$__nodeRequire
1 parent 93c3f32 commit 3c372cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/typings/require.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,17 @@ interface NodeRequire {
4545
* @deprecated use `FileAccess.asFileUri()` for node.js contexts or `FileAccess.asBrowserUri` for browser contexts.
4646
*/
4747
toUrl(path: string): string;
48+
49+
/**
50+
* @deprecated MUST not be used anymore
51+
*
52+
* With the move from AMD to ESM we cannot use this anymore. There will be NO MORE node require like this.
53+
*/
54+
__$__nodeRequire<T>(moduleName: string): T;
55+
4856
(dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
4957
config(data: any): any;
5058
onError: Function;
51-
__$__nodeRequire<T>(moduleName: string): T;
5259
getStats?(): ReadonlyArray<LoaderEvent>;
5360
hasDependencyCycle?(): boolean;
5461
define(amdModuleId: string, dependencies: string[], callback: (...args: any[]) => any): any;

0 commit comments

Comments
 (0)