Skip to content

Skip resolving files directly inside node_modules #52809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
@@ -4917,6 +4917,10 @@
"category": "Message",
"code": 6163
},
"Skipping module '{0}' that looks like an absolute URI, target file types: {1}.": {
"category": "Message",
"code": 6164
},
"Do not truncate error messages.": {
"category": "Message",
"code": 6165
9 changes: 7 additions & 2 deletions src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
@@ -1795,6 +1795,12 @@ function nodeModuleNameResolverWorker(features: NodeResolutionFeatures, moduleNa
resolved = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
}
if (!resolved) {
if (moduleName.indexOf(":") > -1) {
if (traceEnabled) {
trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
}
return undefined;
}
if (traceEnabled) {
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
}
@@ -2896,7 +2902,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu

const loader: ResolutionKindSpecificLoader = (extensions, candidate, onlyRecordFailures, state) => {
let pathAndExtension =
loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
(rest || !(state.features & NodeResolutionFeatures.EsmMode)) && loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
loadNodeModuleFromDirectoryWorker(
extensions,
candidate,
@@ -2937,7 +2943,6 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu
return fromPaths.value;
}
}

return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
}

2 changes: 1 addition & 1 deletion src/testRunner/unittests/tsserver/configuredProjects.ts
Original file line number Diff line number Diff line change
@@ -1139,4 +1139,4 @@ describe("unittests:: tsserver:: ConfiguredProjects:: when reading tsconfig file

baselineTsserverLogs("configuredProjects", "should be tolerated without crashing the server when reading tsconfig file fails", session);
});
});
});
3 changes: 2 additions & 1 deletion tests/baselines/reference/cachedModuleResolution1.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ export declare let x: number
import {x} from "foo";

//// [lib.ts]
import {x} from "foo";
import {x} from "foo";


//// [app.js]
"use strict";
3 changes: 2 additions & 1 deletion tests/baselines/reference/cachedModuleResolution5.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ export declare let x: number
import {x} from "foo";

//// [lib.ts]
import {x} from "foo";
import {x} from "foo";


//// [app.js]
"use strict";
31 changes: 31 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//// [tests/cases/compiler/nodeColonModuleResolution.ts] ////

//// [ph.d.ts]
declare module 'ph' {
namespace constants {
const NODE_PERFORMANCE_GC_MAJOR: number;
const NODE_PERFORMANCE_GC_MINOR: number;
const NODE_PERFORMANCE_GC_INCREMENTAL: number;
const NODE_PERFORMANCE_GC_WEAKCB: number;
const NODE_PERFORMANCE_GC_FLAGS_NO: number;
const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
}
}
declare module 'node:ph' {
export * from 'ph';
}
//// [main.ts]
import * as ph from 'node:ph'
console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE)


//// [main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ph = require("node:ph");
console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE);
60 changes: 60 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
=== /a/b/node_modules/@types/node/ph.d.ts ===
declare module 'ph' {
>'ph' : Symbol("ph", Decl(ph.d.ts, 0, 0))

namespace constants {
>constants : Symbol(constants, Decl(ph.d.ts, 0, 21))

const NODE_PERFORMANCE_GC_MAJOR: number;
>NODE_PERFORMANCE_GC_MAJOR : Symbol(NODE_PERFORMANCE_GC_MAJOR, Decl(ph.d.ts, 2, 13))

const NODE_PERFORMANCE_GC_MINOR: number;
>NODE_PERFORMANCE_GC_MINOR : Symbol(NODE_PERFORMANCE_GC_MINOR, Decl(ph.d.ts, 3, 13))

const NODE_PERFORMANCE_GC_INCREMENTAL: number;
>NODE_PERFORMANCE_GC_INCREMENTAL : Symbol(NODE_PERFORMANCE_GC_INCREMENTAL, Decl(ph.d.ts, 4, 13))

const NODE_PERFORMANCE_GC_WEAKCB: number;
>NODE_PERFORMANCE_GC_WEAKCB : Symbol(NODE_PERFORMANCE_GC_WEAKCB, Decl(ph.d.ts, 5, 13))

const NODE_PERFORMANCE_GC_FLAGS_NO: number;
>NODE_PERFORMANCE_GC_FLAGS_NO : Symbol(NODE_PERFORMANCE_GC_FLAGS_NO, Decl(ph.d.ts, 6, 13))

const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
>NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED : Symbol(NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, Decl(ph.d.ts, 7, 13))

const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
>NODE_PERFORMANCE_GC_FLAGS_FORCED : Symbol(NODE_PERFORMANCE_GC_FLAGS_FORCED, Decl(ph.d.ts, 8, 13))

const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
>NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING : Symbol(NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, Decl(ph.d.ts, 9, 13))

const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(ph.d.ts, 10, 13))

const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY : Symbol(NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, Decl(ph.d.ts, 11, 13))

const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
>NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE : Symbol(NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, Decl(ph.d.ts, 12, 13))
}
}
declare module 'node:ph' {
>'node:ph' : Symbol("node:ph", Decl(ph.d.ts, 14, 1))

export * from 'ph';
}
=== /a/b/main.ts ===
import * as ph from 'node:ph'
>ph : Symbol(ph, Decl(main.ts, 0, 6))

console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE)
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(ph.d.ts, 10, 13))
>ph.constants : Symbol(ph.constants, Decl(ph.d.ts, 0, 21))
>ph : Symbol(ph, Decl(main.ts, 0, 6))
>constants : Symbol(ph.constants, Decl(ph.d.ts, 0, 21))
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(ph.d.ts, 10, 13))

73 changes: 73 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution.trace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
"======== Resolving module 'node:ph' from '/a/b/main.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Skipping module 'node:ph' that looks like an absolute URI, target file types: TypeScript, Declaration.",
"Skipping module 'node:ph' that looks like an absolute URI, target file types: JavaScript.",
"======== Module name 'node:ph' was not resolved. ========",
"======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es5'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es5'",
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es5' was not resolved. ========",
"======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators'",
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-decorators' was not resolved. ========",
"======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========",
"======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom'",
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-dom' was not resolved. ========",
"======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========",
"======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-scripthost'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-scripthost'",
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.",
"Directory 'node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-scripthost' was not resolved. ========"
]
61 changes: 61 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
=== /a/b/node_modules/@types/node/ph.d.ts ===
declare module 'ph' {
>'ph' : typeof import("ph")

namespace constants {
>constants : typeof constants

const NODE_PERFORMANCE_GC_MAJOR: number;
>NODE_PERFORMANCE_GC_MAJOR : number

const NODE_PERFORMANCE_GC_MINOR: number;
>NODE_PERFORMANCE_GC_MINOR : number

const NODE_PERFORMANCE_GC_INCREMENTAL: number;
>NODE_PERFORMANCE_GC_INCREMENTAL : number

const NODE_PERFORMANCE_GC_WEAKCB: number;
>NODE_PERFORMANCE_GC_WEAKCB : number

const NODE_PERFORMANCE_GC_FLAGS_NO: number;
>NODE_PERFORMANCE_GC_FLAGS_NO : number

const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
>NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED : number

const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
>NODE_PERFORMANCE_GC_FLAGS_FORCED : number

const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
>NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING : number

const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : number

const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY : number

const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
>NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE : number
}
}
declare module 'node:ph' {
>'node:ph' : typeof import("node:ph")

export * from 'ph';
}
=== /a/b/main.ts ===
import * as ph from 'node:ph'
>ph : typeof ph

console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE)
>console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : number
>ph.constants : typeof ph.constants
>ph : typeof ph
>constants : typeof ph.constants
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : number

26 changes: 26 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//// [tests/cases/compiler/nodeColonModuleResolution2.ts] ////

//// [index.d.ts]
export namespace constants {
const NODE_PERFORMANCE_GC_MAJOR: number;
const NODE_PERFORMANCE_GC_MINOR: number;
const NODE_PERFORMANCE_GC_INCREMENTAL: number;
const NODE_PERFORMANCE_GC_WEAKCB: number;
const NODE_PERFORMANCE_GC_FLAGS_NO: number;
const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
}
//// [main.ts]
import * as ph from 'fake:thing'
console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE)


//// [main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ph = require("fake:thing");
console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE);
51 changes: 51 additions & 0 deletions tests/baselines/reference/nodeColonModuleResolution2.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
=== /a/b/node_modules/fake/thing/index.d.ts ===
export namespace constants {
>constants : Symbol(constants, Decl(index.d.ts, 0, 0))

const NODE_PERFORMANCE_GC_MAJOR: number;
>NODE_PERFORMANCE_GC_MAJOR : Symbol(NODE_PERFORMANCE_GC_MAJOR, Decl(index.d.ts, 1, 9))

const NODE_PERFORMANCE_GC_MINOR: number;
>NODE_PERFORMANCE_GC_MINOR : Symbol(NODE_PERFORMANCE_GC_MINOR, Decl(index.d.ts, 2, 9))

const NODE_PERFORMANCE_GC_INCREMENTAL: number;
>NODE_PERFORMANCE_GC_INCREMENTAL : Symbol(NODE_PERFORMANCE_GC_INCREMENTAL, Decl(index.d.ts, 3, 9))

const NODE_PERFORMANCE_GC_WEAKCB: number;
>NODE_PERFORMANCE_GC_WEAKCB : Symbol(NODE_PERFORMANCE_GC_WEAKCB, Decl(index.d.ts, 4, 9))

const NODE_PERFORMANCE_GC_FLAGS_NO: number;
>NODE_PERFORMANCE_GC_FLAGS_NO : Symbol(NODE_PERFORMANCE_GC_FLAGS_NO, Decl(index.d.ts, 5, 9))

const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
>NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED : Symbol(NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, Decl(index.d.ts, 6, 9))

const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
>NODE_PERFORMANCE_GC_FLAGS_FORCED : Symbol(NODE_PERFORMANCE_GC_FLAGS_FORCED, Decl(index.d.ts, 7, 9))

const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
>NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING : Symbol(NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, Decl(index.d.ts, 8, 9))

const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(index.d.ts, 9, 9))

const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
>NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY : Symbol(NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, Decl(index.d.ts, 10, 9))

const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
>NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE : Symbol(NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, Decl(index.d.ts, 11, 9))
}
=== /a/b/main.ts ===
import * as ph from 'fake:thing'
>ph : Symbol(ph, Decl(main.ts, 0, 6))

console.log(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE)
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(index.d.ts, 9, 9))
>ph.constants : Symbol(ph.constants, Decl(index.d.ts, 0, 0))
>ph : Symbol(ph, Decl(main.ts, 0, 6))
>constants : Symbol(ph.constants, Decl(index.d.ts, 0, 0))
>NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE : Symbol(ph.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, Decl(index.d.ts, 9, 9))

Loading