mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 22:55:36 -05:00
"Annotate" exported object to fix named / namespace imports of our API in Node ESM (#57133)
This commit is contained in:
@@ -2743,12 +2743,8 @@ export function skipWhile<T, U extends T>(array: readonly T[] | undefined, predi
|
||||
export function isNodeLikeSystem(): boolean {
|
||||
// This is defined here rather than in sys.ts to prevent a cycle from its
|
||||
// use in performanceCore.ts.
|
||||
//
|
||||
// We don't use the presence of `require` to check if we are in Node;
|
||||
// when bundled using esbuild, this function will be rewritten to `__require`
|
||||
// and definitely exist.
|
||||
return typeof process !== "undefined"
|
||||
&& !!process.nextTick
|
||||
&& !(process as any).browser
|
||||
&& typeof module === "object";
|
||||
&& typeof require !== "undefined";
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import {
|
||||
Debug,
|
||||
LogLevel,
|
||||
} from "./_namespaces/ts";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
|
||||
// enable deprecation logging
|
||||
declare const console: any;
|
||||
@@ -23,4 +22,4 @@ if (typeof console !== "undefined") {
|
||||
};
|
||||
}
|
||||
|
||||
export = ts;
|
||||
export * from "./_namespaces/ts";
|
||||
|
||||
Reference in New Issue
Block a user