Skip to content

Commit b85e9e1

Browse files
authored
Use relative module specifiers in error messages if possible (#27441)
* Use relative module specifiers in error messages if possible * Dont share number
1 parent ca840ee commit b85e9e1

File tree

59 files changed

+207
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+207
-149
lines changed

src/compiler/checker.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ namespace ts {
19351935
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
19361936
symbolFromModule || symbolFromVariable;
19371937
if (!symbol) {
1938-
const moduleName = getFullyQualifiedName(moduleSymbol);
1938+
const moduleName = getFullyQualifiedName(moduleSymbol, node);
19391939
const declarationName = declarationNameToString(name);
19401940
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol);
19411941
if (suggestion !== undefined) {
@@ -2101,8 +2101,8 @@ namespace ts {
21012101
}
21022102
}
21032103

2104-
function getFullyQualifiedName(symbol: Symbol): string {
2105-
return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol);
2104+
function getFullyQualifiedName(symbol: Symbol, containingLocation?: Node): string {
2105+
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined, SymbolFormatFlags.DoNotIncludeSymbolChain | SymbolFormatFlags.AllowAnyNodeKind);
21062106
}
21072107

21082108
/**
@@ -3078,6 +3078,9 @@ namespace ts {
30783078
if (flags & SymbolFormatFlags.UseAliasDefinedOutsideCurrentScope) {
30793079
nodeFlags |= NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope;
30803080
}
3081+
if (flags & SymbolFormatFlags.DoNotIncludeSymbolChain) {
3082+
nodeFlags |= NodeBuilderFlags.DoNotIncludeSymbolChain;
3083+
}
30813084
const builder = flags & SymbolFormatFlags.AllowAnyNodeKind ? nodeBuilder.symbolToExpression : nodeBuilder.symbolToEntityName;
30823085
return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
30833086

@@ -3155,7 +3158,12 @@ namespace ts {
31553158
const context: NodeBuilderContext = {
31563159
enclosingDeclaration,
31573160
flags: flags || NodeBuilderFlags.None,
3158-
tracker: tracker && tracker.trackSymbol ? tracker : { trackSymbol: noop },
3161+
// If no full tracker is provided, fake up a dummy one with a basic limited-functionality moduleResolverHost
3162+
tracker: tracker && tracker.trackSymbol ? tracker : { trackSymbol: noop, moduleResolverHost: flags! & NodeBuilderFlags.DoNotIncludeSymbolChain ? {
3163+
getCommonSourceDirectory: (host as Program).getCommonSourceDirectory ? () => (host as Program).getCommonSourceDirectory() : () => "",
3164+
getSourceFiles: () => host.getSourceFiles(),
3165+
getCurrentDirectory: host.getCurrentDirectory && (() => host.getCurrentDirectory!())
3166+
} : undefined },
31593167
encounteredError: false,
31603168
visitedSymbols: undefined,
31613169
inferTypeParameters: undefined,
@@ -3885,7 +3893,7 @@ namespace ts {
38853893
// Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration.
38863894
let chain: Symbol[];
38873895
const isTypeParameter = symbol.flags & SymbolFlags.TypeParameter;
3888-
if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType)) {
3896+
if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType) && !(context.flags & NodeBuilderFlags.DoNotIncludeSymbolChain)) {
38893897
chain = Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true));
38903898
Debug.assert(chain && chain.length > 0);
38913899
}
@@ -4140,6 +4148,9 @@ namespace ts {
41404148
function createExpressionFromSymbolChain(chain: Symbol[], index: number): Expression {
41414149
const typeParameterNodes = lookupTypeParameterNodes(chain, index, context);
41424150
const symbol = chain[index];
4151+
if (some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
4152+
return createLiteral(getSpecifierForModuleSymbol(symbol, context));
4153+
}
41434154

41444155
if (index === 0) {
41454156
context.flags |= NodeBuilderFlags.InInitialEntityName;

src/compiler/moduleSpecifiers.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,18 @@ namespace ts.moduleSpecifiers {
260260
}
261261

262262
function tryGetModuleNameAsNodeModule(moduleFileName: string, { getCanonicalFileName, sourceDirectory }: Info, host: ModuleSpecifierResolutionHost, options: CompilerOptions): string | undefined {
263+
if (!host.fileExists || !host.readFile) {
264+
return undefined;
265+
}
263266
const parts: NodeModulePathParts = getNodeModulePathParts(moduleFileName)!;
264267
if (!parts) {
265268
return undefined;
266269
}
267270

268271
const packageRootPath = moduleFileName.substring(0, parts.packageRootIndex);
269272
const packageJsonPath = combinePaths(packageRootPath, "package.json");
270-
const packageJsonContent = host.fileExists!(packageJsonPath)
271-
? JSON.parse(host.readFile!(packageJsonPath)!)
273+
const packageJsonContent = host.fileExists(packageJsonPath)
274+
? JSON.parse(host.readFile(packageJsonPath)!)
272275
: undefined;
273276
const versionPaths = packageJsonContent && packageJsonContent.typesVersions
274277
? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
@@ -325,11 +328,12 @@ namespace ts.moduleSpecifiers {
325328
}
326329

327330
function tryGetAnyFileFromPath(host: ModuleSpecifierResolutionHost, path: string) {
331+
if (!host.fileExists) return;
328332
// We check all js, `node` and `json` extensions in addition to TS, since node module resolution would also choose those over the directory
329333
const extensions = getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: ScriptKind.JSON }]);
330334
for (const e of extensions) {
331335
const fullPath = path + e;
332-
if (host.fileExists!(fullPath)) { // TODO: GH#18217
336+
if (host.fileExists(fullPath)) {
333337
return fullPath;
334338
}
335339
}

src/compiler/types.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,7 +2908,7 @@ namespace ts {
29082908
}
29092909

29102910
/* @internal */
2911-
export interface TypeCheckerHost {
2911+
export interface TypeCheckerHost extends ModuleSpecifierResolutionHost {
29122912
getCompilerOptions(): CompilerOptions;
29132913

29142914
getSourceFiles(): ReadonlyArray<SourceFile>;
@@ -3183,6 +3183,8 @@ namespace ts {
31833183
InTypeAlias = 1 << 23, // Writing type in type alias declaration
31843184
InInitialEntityName = 1 << 24, // Set when writing the LHS of an entity name or entity name expression
31853185
InReverseMappedType = 1 << 25,
3186+
3187+
/* @internal */ DoNotIncludeSymbolChain = 1 << 26, // Skip looking up and printing an accessible symbol chain
31863188
}
31873189

31883190
// Ensure the shared flags between this and `NodeBuilderFlags` stay in alignment
@@ -3245,6 +3247,9 @@ namespace ts {
32453247

32463248
// Prefer aliases which are not directly visible
32473249
UseAliasDefinedOutsideCurrentScope = 0x00000008,
3250+
3251+
// Skip building an accessible symbol chain
3252+
/* @internal */ DoNotIncludeSymbolChain = 0x00000010,
32483253
}
32493254

32503255
/* @internal */
@@ -5379,7 +5384,7 @@ namespace ts {
53795384
reportInaccessibleThisError?(): void;
53805385
reportPrivateInBaseOfClassExpression?(propertyName: string): void;
53815386
reportInaccessibleUniqueSymbolError?(): void;
5382-
moduleResolverHost?: EmitHost;
5387+
moduleResolverHost?: ModuleSpecifierResolutionHost & { getSourceFiles(): ReadonlyArray<SourceFile>, getCommonSourceDirectory(): string };
53835388
trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void;
53845389
trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void;
53855390
}

tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ declare namespace demoNS {
66
>f : Symbol(f, Decl(demo.d.ts, 0, 26))
77
}
88
declare module 'demoModule' {
9-
>'demoModule' : Symbol('demoModule', Decl(demo.d.ts, 2, 1))
9+
>'demoModule' : Symbol("demoModule", Decl(demo.d.ts, 2, 1))
1010

1111
import alias = demoNS;
1212
>alias : Symbol(alias, Decl(demo.d.ts, 3, 29))

tests/baselines/reference/allowSyntheticDefaultImports8.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/a.ts(1,10): error TS2305: Module '"tests/cases/compiler/b"' has no exported member 'default'.
1+
tests/cases/compiler/a.ts(1,10): error TS2305: Module '"./b"' has no exported member 'default'.
22

33

44
==== tests/cases/compiler/b.d.ts (0 errors) ====
@@ -9,6 +9,6 @@ tests/cases/compiler/a.ts(1,10): error TS2305: Module '"tests/cases/compiler/b"'
99
==== tests/cases/compiler/a.ts (1 errors) ====
1010
import { default as Foo } from "./b";
1111
~~~~~~~
12-
!!! error TS2305: Module '"tests/cases/compiler/b"' has no exported member 'default'.
12+
!!! error TS2305: Module '"./b"' has no exported member 'default'.
1313
Foo.bar();
1414
Foo.foo();

tests/baselines/reference/ambientDeclarations.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var q = M1.fn();
160160
// Ambient external module in the global module
161161
// Ambient external module with a string literal name that is a top level external module name
162162
declare module 'external1' {
163-
>'external1' : Symbol('external1', Decl(ambientDeclarations.ts, 67, 16))
163+
>'external1' : Symbol("external1", Decl(ambientDeclarations.ts, 67, 16))
164164

165165
var q;
166166
>q : Symbol(q, Decl(ambientDeclarations.ts, 72, 7))

tests/baselines/reference/ambientDeclarationsExternal.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var n: number;
2020
=== tests/cases/conformance/ambient/decls.ts ===
2121
// Ambient external module with export assignment
2222
declare module 'equ' {
23-
>'equ' : Symbol('equ', Decl(decls.ts, 0, 0))
23+
>'equ' : Symbol("equ", Decl(decls.ts, 0, 0))
2424

2525
var x;
2626
>x : Symbol(x, Decl(decls.ts, 2, 7))
@@ -30,7 +30,7 @@ declare module 'equ' {
3030
}
3131

3232
declare module 'equ2' {
33-
>'equ2' : Symbol('equ2', Decl(decls.ts, 4, 1))
33+
>'equ2' : Symbol("equ2", Decl(decls.ts, 4, 1))
3434

3535
var x: number;
3636
>x : Symbol(x, Decl(decls.ts, 7, 7))

tests/baselines/reference/ambientErrors.symbols

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ module M2 {
9090
>M2 : Symbol(M2, Decl(ambientErrors.ts, 42, 1))
9191

9292
declare module 'nope' { }
93-
>'nope' : Symbol('nope', Decl(ambientErrors.ts, 45, 11))
93+
>'nope' : Symbol("nope", Decl(ambientErrors.ts, 45, 11))
9494
}
9595

9696
// Ambient external module with a string literal name that isn't a top level external module name
9797
declare module '../foo' { }
98-
>'../foo' : Symbol('../foo', Decl(ambientErrors.ts, 47, 1))
98+
>'../foo' : Symbol("../foo", Decl(ambientErrors.ts, 47, 1))
9999

100100
// Ambient external module with export assignment and other exported members
101101
declare module 'bar' {
102-
>'bar' : Symbol('bar', Decl(ambientErrors.ts, 50, 27))
102+
>'bar' : Symbol("bar", Decl(ambientErrors.ts, 50, 27))
103103

104104
var n;
105105
>n : Symbol(n, Decl(ambientErrors.ts, 54, 7))

tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var c = new A();
99

1010
=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts ===
1111
declare module 'M' {
12-
>'M' : Symbol('M', Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0))
12+
>'M' : Symbol("M", Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0))
1313

1414
module C {
1515
>C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5))

tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var c = new A();
99

1010
=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts ===
1111
declare module 'M' {
12-
>'M' : Symbol('M', Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0))
12+
>'M' : Symbol("M", Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0))
1313

1414
module C {
1515
>C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5))

tests/baselines/reference/augmentExportEquals3.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
=== tests/cases/compiler/file1.ts ===
22
function foo() {}
3-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8))
3+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8))
44

55
namespace foo {
6-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8))
6+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8))
77

88
export var v = 1;
99
>v : Symbol(v, Decl(file1.ts, 2, 14))

tests/baselines/reference/augmentExportEquals3_1.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ declare module "file1" {
33
>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0))
44

55
function foo(): void;
6-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8))
6+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8))
77

88
namespace foo {
9-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8))
9+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8))
1010

1111
export var v: number;
1212
>v : Symbol(v, Decl(file1.d.ts, 3, 18))

tests/baselines/reference/augmentExportEquals4.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
=== tests/cases/compiler/file1.ts ===
22
class foo {}
3-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8))
3+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8))
44

55
namespace foo {
6-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8))
6+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8))
77

88
export var v = 1;
99
>v : Symbol(v, Decl(file1.ts, 2, 14))

tests/baselines/reference/augmentExportEquals4_1.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ declare module "file1" {
33
>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0))
44

55
class foo {}
6-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8))
6+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8))
77

88
namespace foo {
9-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8))
9+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8))
1010

1111
export var v: number;
1212
>v : Symbol(v, Decl(file1.d.ts, 3, 18))

tests/baselines/reference/augmentExportEquals5.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ declare module "express" {
1616
>"express" : Symbol("express", Decl(express.d.ts, 4, 1))
1717

1818
function e(): e.Express;
19-
>e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29))
19+
>e : Symbol("tests/cases/compiler/express.d.ts", Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29))
2020
>e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28))
2121
>Express : Symbol(Express, Decl(express.d.ts, 52, 9))
2222

2323
namespace e {
24-
>e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29))
24+
>e : Symbol("tests/cases/compiler/express.d.ts", Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29))
2525

2626
interface IRoute {
2727
>IRoute : Symbol(IRoute, Decl(express.d.ts, 8, 17))

tests/baselines/reference/augmentExportEquals6.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
=== tests/cases/compiler/file1.ts ===
22
class foo {}
3-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10))
3+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10))
44

55
namespace foo {
6-
>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10))
6+
>foo : Symbol("tests/cases/compiler/file1.ts", Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10))
77

88
export class A {}
99
>A : Symbol(A, Decl(file1.ts, 1, 15), Decl(file2.ts, 4, 26))

tests/baselines/reference/augmentExportEquals6_1.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ declare module "file1" {
33
>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0))
44

55
class foo {}
6-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28))
6+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28))
77

88
namespace foo {
9-
>foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28))
9+
>foo : Symbol("tests/cases/compiler/file1.d.ts", Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28))
1010

1111
class A {}
1212
>A : Symbol(A, Decl(file1.d.ts, 2, 19), Decl(file2.ts, 4, 24))

tests/baselines/reference/bangInModuleName.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare module "http" {
1010
}
1111

1212
declare module 'intern/dojo/node!http' {
13-
>'intern/dojo/node!http' : Symbol('intern/dojo/node!http', Decl(a.d.ts, 1, 1))
13+
>'intern/dojo/node!http' : Symbol("intern/dojo/node!http", Decl(a.d.ts, 1, 1))
1414

1515
import http = require('http');
1616
>http : Symbol(http, Decl(a.d.ts, 3, 40))

tests/baselines/reference/declFileImportedTypeUseInTypeArgPosition.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ class List<T> { }
44
>T : Symbol(T, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 11))
55

66
declare module 'mod1' {
7-
>'mod1' : Symbol('mod1', Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 17))
7+
>'mod1' : Symbol("mod1", Decl(declFileImportedTypeUseInTypeArgPosition.ts, 0, 17))
88

99
class Foo {
1010
>Foo : Symbol(Foo, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 1, 23))
1111
}
1212
}
1313

1414
declare module 'moo' {
15-
>'moo' : Symbol('moo', Decl(declFileImportedTypeUseInTypeArgPosition.ts, 4, 1))
15+
>'moo' : Symbol("moo", Decl(declFileImportedTypeUseInTypeArgPosition.ts, 4, 1))
1616

1717
import x = require('mod1');
1818
>x : Symbol(x, Decl(declFileImportedTypeUseInTypeArgPosition.ts, 6, 22))

tests/baselines/reference/declarationEmitCrossFileImportTypeOfAmbientModule.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/types/component.d.ts ===
22
declare module '@namespace/component' {
3-
>'@namespace/component' : Symbol('@namespace/component', Decl(component.d.ts, 0, 0))
3+
>'@namespace/component' : Symbol("@namespace/component", Decl(component.d.ts, 0, 0))
44

55
export class Foo {}
66
>Foo : Symbol(Foo, Decl(component.d.ts, 0, 39))

tests/baselines/reference/declaredExternalModule.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/declaredExternalModule.ts ===
22
declare module 'connect' {
3-
>'connect' : Symbol('connect', Decl(declaredExternalModule.ts, 0, 0))
3+
>'connect' : Symbol("connect", Decl(declaredExternalModule.ts, 0, 0))
44

55
interface connectModule {
66
>connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))

tests/baselines/reference/declaredExternalModuleWithExportAssignment.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/declaredExternalModuleWithExportAssignment.ts ===
22
declare module 'connect' {
3-
>'connect' : Symbol('connect', Decl(declaredExternalModuleWithExportAssignment.ts, 0, 0))
3+
>'connect' : Symbol("connect", Decl(declaredExternalModuleWithExportAssignment.ts, 0, 0))
44

55
interface connectModule {
66
>connectModule : Symbol(connectModule, Decl(declaredExternalModuleWithExportAssignment.ts, 0, 26))

0 commit comments

Comments
 (0)