diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 97e6077715924..841acea9a868d 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -263,6 +263,10 @@ namespace ts { return InternalSymbolName.ExportStar; case SyntaxKind.ExportAssignment: return (node).isExportEquals ? InternalSymbolName.ExportEquals : InternalSymbolName.Default; + case SyntaxKind.SourceFile: + // json file should behave as + // module.exports = ... + return InternalSymbolName.ExportEquals; case SyntaxKind.BinaryExpression: if (getSpecialPropertyAssignmentKind(node as BinaryExpression) === SpecialPropertyAssignmentKind.ModuleExports) { // module.exports = ... @@ -2184,6 +2188,13 @@ namespace ts { if (isExternalModule(file)) { bindSourceFileAsExternalModule(); } + else if (isJsonSourceFile(file)) { + bindSourceFileAsExternalModule(); + // Create symbol equivalent for the module.exports = {} + const originalFileSymbol = file.symbol; + declareSymbol(file.symbol.exports, file.symbol, file, SymbolFlags.Property, SymbolFlags.Property | SymbolFlags.AliasExcludes | SymbolFlags.Class | SymbolFlags.Function); + file.symbol = originalFileSymbol; + } } function bindSourceFileAsExternalModule() { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 28c9fb25af9e8..404b6e8cd35e3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4552,6 +4552,11 @@ namespace ts { return links.type = anyType; } // Handle export default expressions + if (declaration.kind === SyntaxKind.SourceFile) { + // JSON file + const jsonSourceFile = declaration; + return links.type = jsonSourceFile.jsonObject ? checkObjectLiteral(jsonSourceFile.jsonObject) : emptyObjectType; + } if (declaration.kind === SyntaxKind.ExportAssignment) { return links.type = checkExpression((declaration).expression); } @@ -13606,7 +13611,8 @@ namespace ts { const contextualType = getApparentTypeOfContextualType(node); const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === SyntaxKind.ObjectBindingPattern || contextualType.pattern.kind === SyntaxKind.ObjectLiteralExpression); - const isJSObjectLiteral = !contextualType && isInJavaScriptFile(node); + const isJSObjectLiteral = !contextualType && isInJavaScriptFile(node) && + !(isSourceFile(node.parent) && isJsonSourceFile(node.parent) && node.parent.jsonObject === node); let typeFlags: TypeFlags = 0; let patternWithComputedProperties = false; let hasComputedStringProperty = false; @@ -22644,6 +22650,9 @@ namespace ts { flowAnalysisDisabled = false; forEach(node.statements, checkSourceElement); + if (isJsonSourceFile(node) && node.jsonObject) { + checkObjectLiteral(node.jsonObject); + } checkDeferredNodes(); diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 54e5ee1d01dbc..854e2df5cd9ad 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1673,7 +1673,7 @@ namespace ts { return undefined; } let extendedConfigPath = toPath(extendedConfig, basePath, getCanonicalFileName); - if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, ".json")) { + if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, Extension.Json)) { extendedConfigPath = `${extendedConfigPath}.json` as Path; if (!host.fileExists(extendedConfigPath)) { errors.push(createDiagnostic(Diagnostics.File_0_does_not_exist, extendedConfig)); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index f5e2a4069e452..b6858772fb981 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -2221,7 +2221,7 @@ namespace ts { return ScriptKind.TS; case Extension.Tsx: return ScriptKind.TSX; - case ".json": + case Extension.Json: return ScriptKind.JSON; default: return ScriptKind.Unknown; @@ -2316,9 +2316,9 @@ namespace ts { } } - const extensionsToRemove = [Extension.Dts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx]; + export const allSupportedExtensionForExtraction: ReadonlyArray = [...supportedTypescriptExtensionsForExtractExtension, , ...supportedJavascriptExtensions, Extension.Json]; export function removeFileExtension(path: string): string { - for (const ext of extensionsToRemove) { + for (const ext of allSupportedExtensionForExtraction) { const extensionless = tryRemoveExtension(path, ext); if (extensionless !== undefined) { return extensionless; @@ -2614,7 +2614,7 @@ namespace ts { } export function tryGetExtensionFromPath(path: string): Extension | undefined { - return find(supportedTypescriptExtensionsForExtractExtension, e => fileExtensionIs(path, e)) || find(supportedJavascriptExtensions, e => fileExtensionIs(path, e)); + return find(allSupportedExtensionForExtraction, e => fileExtensionIs(path, e)); } export function isCheckJsEnabledForFile(sourceFile: SourceFile, compilerOptions: CompilerOptions) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 8788e0c02f455..23348024f21d2 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -62,6 +62,9 @@ namespace ts { return Extension.Jsx; } } + if (isJsonSourceFile(sourceFile)) { + return Extension.Json; + } return Extension.Js; } @@ -2236,6 +2239,9 @@ namespace ts { const index = findIndex(statements, statement => !isPrologueDirective(statement)); emitList(node, statements, ListFormat.MultiLine, index === -1 ? statements.length : index); popNameGenerationScope(); + if (isJsonSourceFile(node) && node.jsonObject) { + emitObjectLiteralExpression(node.jsonObject); + } } // Transformation nodes diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 7252a9f0c1d8d..d91c27f3aed51 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -2258,6 +2258,7 @@ namespace ts { const updated = createSynthesizedNode(SyntaxKind.SourceFile); updated.flags |= node.flags; updated.statements = createNodeArray(statements); + if (isJsonSourceFile(node) && node.jsonObject !== undefined) (updated).jsonObject = node.jsonObject; updated.endOfFileToken = node.endOfFileToken; updated.fileName = node.fileName; updated.path = node.path; diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index ddffe876d8085..5796394d47e78 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -48,7 +48,8 @@ namespace ts { enum Extensions { TypeScript, /** '.ts', '.tsx', or '.d.ts' */ JavaScript, /** '.js' or '.jsx' */ - DtsOnly /** Only '.d.ts' */ + Json, /** '.json' */ + DtsOnly, /** Only '.d.ts' */ } interface PathAndPackageId { @@ -110,6 +111,7 @@ namespace ts { trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path); } return path; + } } @@ -722,7 +724,7 @@ namespace ts { const failedLookupLocations: string[] = []; const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; - const result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript)); + const result = (jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript))) || tryResolve(Extensions.Json); if (result && result.value) { const { resolved, isExternalLibraryImport } = result.value; return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations); @@ -825,7 +827,7 @@ namespace ts { // If that didn't work, try stripping a ".js" or ".jsx" extension and replacing it with a TypeScript one; // e.g. "./foo.js" can be matched by "./foo.ts" or "./foo.d.ts" - if (hasJavaScriptFileExtension(candidate)) { + if (hasJavaScriptFileExtension(candidate) || fileExtensionIs(candidate, Extension.Json)) { const extensionless = removeFileExtension(candidate); if (state.traceEnabled) { const extension = candidate.substring(extensionless.length); @@ -852,6 +854,8 @@ namespace ts { return tryExtension(Extension.Ts) || tryExtension(Extension.Tsx) || tryExtension(Extension.Dts); case Extensions.JavaScript: return tryExtension(Extension.Js) || tryExtension(Extension.Jsx); + case Extensions.Json: + return tryExtension(Extension.Json); } function tryExtension(ext: Extension): PathAndExtension | undefined { @@ -925,7 +929,7 @@ namespace ts { } function loadModuleFromPackageJson(jsonContent: PackageJson, extensions: Extensions, candidate: string, failedLookupLocations: Push, state: ModuleResolutionState): PathAndExtension | undefined { - const file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, jsonContent, candidate, state); + const file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript && extensions !== Extensions.Json, jsonContent, candidate, state); if (!file) { return undefined; } @@ -964,6 +968,8 @@ namespace ts { switch (extensions) { case Extensions.JavaScript: return extension === Extension.Js || extension === Extension.Jsx; + case Extensions.Json: + return extension === Extension.Json; case Extensions.TypeScript: return extension === Extension.Ts || extension === Extension.Tsx || extension === Extension.Dts; case Extensions.DtsOnly: @@ -1023,7 +1029,7 @@ namespace ts { if (packageResult) { return packageResult; } - if (extensions !== Extensions.JavaScript) { + if (extensions !== Extensions.JavaScript && extensions !== Extensions.Json) { const nodeModulesAtTypes = combinePaths(nodeModulesFolder, "@types"); let nodeModulesAtTypesExists = nodeModulesFolderExists; if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes, state.host)) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index f65f4c09f3fa6..2df28ef93b18c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -222,6 +222,7 @@ namespace ts { return visitNodes(cbNode, cbNodes, (node).statements); case SyntaxKind.SourceFile: return visitNodes(cbNode, cbNodes, (node).statements) || + visitNode(cbNode, (node).jsonObject) || visitNode(cbNode, (node).endOfFileToken); case SyntaxKind.VariableStatement: return visitNodes(cbNode, cbNodes, node.decorators) || @@ -616,6 +617,13 @@ namespace ts { export function parseSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, syntaxCursor: IncrementalParser.SyntaxCursor, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile { scriptKind = ensureScriptKind(fileName, scriptKind); + if (scriptKind === ScriptKind.JSON) { + const result = parseJsonText(fileName, sourceText, languageVersion, syntaxCursor, setParentNodes); + result.statements = createNodeArray(/*elements*/ [], result.pos); + result.typeReferenceDirectives = emptyArray; + result.amdDependencies = emptyArray; + return result; + } initializeState(sourceText, languageVersion, syntaxCursor, scriptKind); @@ -636,8 +644,8 @@ namespace ts { return isInvalid ? entityName : undefined; } - export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile { - initializeState(sourceText, ScriptTarget.ES2015, /*syntaxCursor*/ undefined, ScriptKind.JSON); + export function parseJsonText(fileName: string, sourceText: string, languageVersion: ScriptTarget = ScriptTarget.ES2015, syntaxCursor?: IncrementalParser.SyntaxCursor, setParentNodes?: boolean): JsonSourceFile { + initializeState(sourceText, languageVersion, syntaxCursor, ScriptKind.JSON); // Set source file so that errors will be reported with this file name sourceFile = createSourceFile(fileName, ScriptTarget.ES2015, ScriptKind.JSON); const result = sourceFile; @@ -656,6 +664,10 @@ namespace ts { parseExpected(SyntaxKind.OpenBraceToken); } + if (setParentNodes) { + fixupParentReferences(sourceFile); + } + sourceFile.parseDiagnostics = parseDiagnostics; clearState(); return result; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index f18d396e9dd9b..29e25eee600b3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2222,6 +2222,7 @@ namespace ts { switch (extension) { case Extension.Ts: case Extension.Dts: + case Extension.Json: // These are always allowed. return undefined; case Extension.Tsx: diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5347d7caaf02c..e9c69c426e284 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4072,7 +4072,8 @@ namespace ts { Tsx = ".tsx", Dts = ".d.ts", Js = ".js", - Jsx = ".jsx" + Jsx = ".jsx", + Json = ".json" } export interface ResolvedModuleWithFailedLookupLocations { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 47cf2038f03b6..25f6ad8aabc5e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -649,6 +649,10 @@ namespace ts { return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; } + export function isJsonSourceFile(file: SourceFile): file is JsonSourceFile { + return file.scriptKind === ScriptKind.JSON; + } + export function isConstEnumDeclaration(node: Node): boolean { return node.kind === SyntaxKind.EnumDeclaration && isConst(node); } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index fb5e9e0354e72..0eab07e453706 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -349,7 +349,7 @@ namespace FourSlash { // resolveReference file-option is not specified then do not resolve any files and include all inputFiles this.inputFiles.forEach((file, fileName) => { if (!Harness.isDefaultLibraryFile(fileName)) { - this.languageServiceAdapterHost.addScript(fileName, file, /*isRootFile*/ true); + this.languageServiceAdapterHost.addScript(fileName, file, /*isRootFile*/ !ts.fileExtensionIs(fileName, ts.Extension.Json)); } }); this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 8344be36753ed..9cc74591d6f65 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1170,7 +1170,7 @@ namespace Harness { } - const programFileNames = programFiles.map(file => file.unitName); + const programFileNames = programFiles.map(file => file.unitName).filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); const compilerHost = createCompilerHost( programFiles.concat(otherFiles), @@ -1718,7 +1718,7 @@ namespace Harness { // .d.ts file, add to declFiles emit this.declFilesCode.push(emittedFile); } - else if (isJS(emittedFile.fileName) || isJSX(emittedFile.fileName)) { + else if (isJS(emittedFile.fileName) || isJSX(emittedFile.fileName) || ts.fileExtensionIs(emittedFile.fileName, ts.Extension.Json)) { // .js file, add to files this.files.push(emittedFile); } diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index 1e9316fa0ae14..6f5743e70c512 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -29,7 +29,7 @@ class TypeWriterWalker { } private visitNode(node: ts.Node): void { - if (ts.isPartOfExpression(node) || node.kind === ts.SyntaxKind.Identifier) { + if (ts.isPartOfExpression(node) || node.kind === ts.SyntaxKind.Identifier || ts.isDeclarationName(node)) { this.logTypeAndSymbol(node); } diff --git a/src/harness/unittests/reuseProgramStructure.ts b/src/harness/unittests/reuseProgramStructure.ts index 8c8c10346777e..bd4fddfd2a48f 100644 --- a/src/harness/unittests/reuseProgramStructure.ts +++ b/src/harness/unittests/reuseProgramStructure.ts @@ -457,6 +457,10 @@ namespace ts { "File 'node_modules/a.jsx' does not exist.", "File 'node_modules/a/index.js' does not exist.", "File 'node_modules/a/index.jsx' does not exist.", + "Loading module 'a' from 'node_modules' folder, target file type 'Json'.", + "File 'node_modules/a/package.json' does not exist.", + "File 'node_modules/a.json' does not exist.", + "File 'node_modules/a/index.json' does not exist.", "======== Module name 'a' was not resolved. ========" ], "initialProgram: execute module resolution normally."); diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/harness/unittests/tsserverProjectSystem.ts index 651dbae7142de..2d05e57b31329 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/harness/unittests/tsserverProjectSystem.ts @@ -2507,6 +2507,10 @@ namespace ts.projectSystem { "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Loading module 'lib' from 'node_modules' folder, target file type 'Json'.", + "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name 'lib' was not resolved. ========", `Auto discovery for typings is enabled in project '${proj.getProjectName()}'. Running extra resolution pass for module 'lib' using cache location '/a/cache'.`, "File '/a/cache/node_modules/lib.d.ts' does not exist.", diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index c775a995fd666..f1859a90b98fa 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -207,7 +207,7 @@ namespace ts.JsTyping { } // depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar` - const fileNames = host.readDirectory(packagesFolderPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2); + const fileNames = host.readDirectory(packagesFolderPath, [Extension.Json], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2); if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(fileNames)}`); const packageNames: string[] = []; for (const fileName of fileNames) { diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index 7e8e748bb172d..dce5a6639c921 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -438,4 +438,4 @@ namespace ts.SignatureHelp { }; } } -} \ No newline at end of file +} diff --git a/tests/baselines/reference/ambientDeclarations.symbols b/tests/baselines/reference/ambientDeclarations.symbols index ef5c5403ccf5b..1436c698cff51 100644 --- a/tests/baselines/reference/ambientDeclarations.symbols +++ b/tests/baselines/reference/ambientDeclarations.symbols @@ -160,6 +160,8 @@ var q = M1.fn(); // Ambient external module in the global module // Ambient external module with a string literal name that is a top level external module name declare module 'external1' { +>'external1' : Symbol('external1', Decl(ambientDeclarations.ts, 67, 16)) + var q; >q : Symbol(q, Decl(ambientDeclarations.ts, 72, 7)) } diff --git a/tests/baselines/reference/ambientDeclarations.types b/tests/baselines/reference/ambientDeclarations.types index a571eb9fa7bf7..3d0b53ee19d2d 100644 --- a/tests/baselines/reference/ambientDeclarations.types +++ b/tests/baselines/reference/ambientDeclarations.types @@ -163,6 +163,8 @@ var q = M1.fn(); // Ambient external module in the global module // Ambient external module with a string literal name that is a top level external module name declare module 'external1' { +>'external1' : typeof 'external1' + var q; >q : any } diff --git a/tests/baselines/reference/ambientDeclarationsExternal.symbols b/tests/baselines/reference/ambientDeclarationsExternal.symbols index 57d3fdf914f3a..49f0775e1366e 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.symbols +++ b/tests/baselines/reference/ambientDeclarationsExternal.symbols @@ -20,6 +20,8 @@ var n: number; === tests/cases/conformance/ambient/decls.ts === // Ambient external module with export assignment declare module 'equ' { +>'equ' : Symbol('equ', Decl(decls.ts, 0, 0)) + var x; >x : Symbol(x, Decl(decls.ts, 2, 7)) @@ -28,6 +30,8 @@ declare module 'equ' { } declare module 'equ2' { +>'equ2' : Symbol('equ2', Decl(decls.ts, 4, 1)) + var x: number; >x : Symbol(x, Decl(decls.ts, 7, 7)) } diff --git a/tests/baselines/reference/ambientDeclarationsExternal.types b/tests/baselines/reference/ambientDeclarationsExternal.types index 4cf7d6b0bcb60..522c9bd1442db 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.types +++ b/tests/baselines/reference/ambientDeclarationsExternal.types @@ -20,6 +20,8 @@ var n: number; === tests/cases/conformance/ambient/decls.ts === // Ambient external module with export assignment declare module 'equ' { +>'equ' : typeof 'equ' + var x; >x : any @@ -28,6 +30,8 @@ declare module 'equ' { } declare module 'equ2' { +>'equ2' : typeof 'equ2' + var x: number; >x : number } diff --git a/tests/baselines/reference/ambientDeclarationsPatterns.symbols b/tests/baselines/reference/ambientDeclarationsPatterns.symbols index 4c0acc93f8f93..22fc293787269 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns.symbols @@ -25,23 +25,31 @@ foo(fileText); === tests/cases/conformance/ambient/declarations.d.ts === declare module "foo*baz" { +>"foo*baz" : Symbol("foo*baz", Decl(declarations.d.ts, 0, 0), Decl(declarations.d.ts, 2, 1)) + export function foo(s: string): void; >foo : Symbol(foo, Decl(declarations.d.ts, 0, 26)) >s : Symbol(s, Decl(declarations.d.ts, 1, 24)) } // Augmentations still work declare module "foo*baz" { +>"foo*baz" : Symbol("foo*baz", Decl(declarations.d.ts, 0, 0), Decl(declarations.d.ts, 2, 1)) + export const baz: string; >baz : Symbol(baz, Decl(declarations.d.ts, 5, 16)) } // Longest prefix wins declare module "foos*" { +>"foos*" : Symbol("foos*", Decl(declarations.d.ts, 6, 1)) + export const foos: string; >foos : Symbol(foos, Decl(declarations.d.ts, 10, 16)) } declare module "*!text" { +>"*!text" : Symbol("*!text", Decl(declarations.d.ts, 11, 1)) + const x: string; >x : Symbol(x, Decl(declarations.d.ts, 14, 9)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns.types b/tests/baselines/reference/ambientDeclarationsPatterns.types index adf8ae1ab3b20..77cef7515b269 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns.types @@ -28,23 +28,31 @@ foo(fileText); === tests/cases/conformance/ambient/declarations.d.ts === declare module "foo*baz" { +>"foo*baz" : typeof "foo*baz" + export function foo(s: string): void; >foo : (s: string) => void >s : string } // Augmentations still work declare module "foo*baz" { +>"foo*baz" : typeof "foo*baz" + export const baz: string; >baz : string } // Longest prefix wins declare module "foos*" { +>"foos*" : typeof "foos*" + export const foos: string; >foos : string } declare module "*!text" { +>"*!text" : typeof "*!text" + const x: string; >x : string diff --git a/tests/baselines/reference/ambientExternalModuleMerging.symbols b/tests/baselines/reference/ambientExternalModuleMerging.symbols index 7fea7fea89fbd..b99157b11422c 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.symbols +++ b/tests/baselines/reference/ambientExternalModuleMerging.symbols @@ -17,12 +17,16 @@ var y = M.y; === tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts === declare module "M" { +>"M" : Symbol("M", Decl(ambientExternalModuleMerging_declare.ts, 0, 0), Decl(ambientExternalModuleMerging_declare.ts, 2, 1)) + export var x: string; >x : Symbol(x, Decl(ambientExternalModuleMerging_declare.ts, 1, 14)) } // Merge declare module "M" { +>"M" : Symbol("M", Decl(ambientExternalModuleMerging_declare.ts, 0, 0), Decl(ambientExternalModuleMerging_declare.ts, 2, 1)) + export var y: string; >y : Symbol(y, Decl(ambientExternalModuleMerging_declare.ts, 6, 14)) } diff --git a/tests/baselines/reference/ambientExternalModuleMerging.types b/tests/baselines/reference/ambientExternalModuleMerging.types index 1c1be0fd25665..8150f6c6dfc03 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.types +++ b/tests/baselines/reference/ambientExternalModuleMerging.types @@ -17,12 +17,16 @@ var y = M.y; === tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts === declare module "M" { +>"M" : typeof "M" + export var x: string; >x : string } // Merge declare module "M" { +>"M" : typeof "M" + export var y: string; >y : string } diff --git a/tests/baselines/reference/ambientExternalModuleReopen.symbols b/tests/baselines/reference/ambientExternalModuleReopen.symbols index a2a1ba72fab62..74bc430550b77 100644 --- a/tests/baselines/reference/ambientExternalModuleReopen.symbols +++ b/tests/baselines/reference/ambientExternalModuleReopen.symbols @@ -1,9 +1,13 @@ === tests/cases/compiler/ambientExternalModuleReopen.ts === declare module "fs" { +>"fs" : Symbol("fs", Decl(ambientExternalModuleReopen.ts, 0, 0), Decl(ambientExternalModuleReopen.ts, 2, 1)) + var x: string; >x : Symbol(x, Decl(ambientExternalModuleReopen.ts, 1, 7)) } declare module 'fs' { +>'fs' : Symbol("fs", Decl(ambientExternalModuleReopen.ts, 0, 0), Decl(ambientExternalModuleReopen.ts, 2, 1)) + var y: number; >y : Symbol(y, Decl(ambientExternalModuleReopen.ts, 4, 7)) } diff --git a/tests/baselines/reference/ambientExternalModuleReopen.types b/tests/baselines/reference/ambientExternalModuleReopen.types index 842d634344cdc..dffba752e0555 100644 --- a/tests/baselines/reference/ambientExternalModuleReopen.types +++ b/tests/baselines/reference/ambientExternalModuleReopen.types @@ -1,9 +1,13 @@ === tests/cases/compiler/ambientExternalModuleReopen.ts === declare module "fs" { +>"fs" : typeof "fs" + var x: string; >x : string } declare module 'fs' { +>'fs' : typeof "fs" + var y: number; >y : number } diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols index d7e3b5925b107..621c7b3ebfc20 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols @@ -9,6 +9,8 @@ var c = new A(); === tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts === declare module 'M' { +>'M' : Symbol('M', Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0)) + module C { >C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5)) diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types index 4e9043d1b75f8..1737229413118 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types @@ -10,6 +10,8 @@ var c = new A(); === tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts === declare module 'M' { +>'M' : typeof 'M' + module C { >C : typeof C diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols index 15ddf4ac48838..6827122959d55 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols @@ -9,6 +9,8 @@ var c = new A(); === tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts === declare module 'M' { +>'M' : Symbol('M', Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0)) + module C { >C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5)) diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types index 0029817400bc5..c943603fb52ee 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types @@ -10,6 +10,8 @@ var c = new A(); === tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts === declare module 'M' { +>'M' : typeof 'M' + module C { >C : typeof C diff --git a/tests/baselines/reference/ambientRequireFunction.symbols b/tests/baselines/reference/ambientRequireFunction.symbols index 11f91a66357f8..b2e94e89a2cb9 100644 --- a/tests/baselines/reference/ambientRequireFunction.symbols +++ b/tests/baselines/reference/ambientRequireFunction.symbols @@ -18,6 +18,8 @@ declare function require(moduleName: string): any; >moduleName : Symbol(moduleName, Decl(node.d.ts, 0, 25)) declare module "fs" { +>"fs" : Symbol("fs", Decl(node.d.ts, 0, 50)) + export function readFileSync(s: string): string; >readFileSync : Symbol(readFileSync, Decl(node.d.ts, 2, 21)) >s : Symbol(s, Decl(node.d.ts, 3, 33)) diff --git a/tests/baselines/reference/ambientRequireFunction.types b/tests/baselines/reference/ambientRequireFunction.types index 5ae9a85188cf1..ed34aa4309f77 100644 --- a/tests/baselines/reference/ambientRequireFunction.types +++ b/tests/baselines/reference/ambientRequireFunction.types @@ -21,6 +21,8 @@ declare function require(moduleName: string): any; >moduleName : string declare module "fs" { +>"fs" : typeof "fs" + export function readFileSync(s: string): string; >readFileSync : (s: string) => string >s : string diff --git a/tests/baselines/reference/ambientShorthand.symbols b/tests/baselines/reference/ambientShorthand.symbols index 6747fd6517304..c2231ac5c3deb 100644 --- a/tests/baselines/reference/ambientShorthand.symbols +++ b/tests/baselines/reference/ambientShorthand.symbols @@ -18,7 +18,9 @@ foo(bar, baz, boom); === tests/cases/conformance/ambient/declarations.d.ts === declare module "jquery" -No type information for this code.// Semicolon is optional -No type information for this code.declare module "fs"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"jquery" : Symbol("jquery", Decl(declarations.d.ts, 0, 0)) + +// Semicolon is optional +declare module "fs"; +>"fs" : Symbol("fs", Decl(declarations.d.ts, 0, 23)) + diff --git a/tests/baselines/reference/ambientShorthand.types b/tests/baselines/reference/ambientShorthand.types index 054349b1a6a44..4c93cc7fd8f0c 100644 --- a/tests/baselines/reference/ambientShorthand.types +++ b/tests/baselines/reference/ambientShorthand.types @@ -19,7 +19,9 @@ foo(bar, baz, boom); === tests/cases/conformance/ambient/declarations.d.ts === declare module "jquery" -No type information for this code.// Semicolon is optional -No type information for this code.declare module "fs"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"jquery" : any + +// Semicolon is optional +declare module "fs"; +>"fs" : any + diff --git a/tests/baselines/reference/ambientShorthand_declarationEmit.symbols b/tests/baselines/reference/ambientShorthand_declarationEmit.symbols index f1b3284b0f2f8..f1eabac0e9ebb 100644 --- a/tests/baselines/reference/ambientShorthand_declarationEmit.symbols +++ b/tests/baselines/reference/ambientShorthand_declarationEmit.symbols @@ -1,4 +1,4 @@ === tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : Symbol("foo", Decl(ambientShorthand_declarationEmit.ts, 0, 0)) + diff --git a/tests/baselines/reference/ambientShorthand_declarationEmit.types b/tests/baselines/reference/ambientShorthand_declarationEmit.types index f1b3284b0f2f8..c5c8411bb0311 100644 --- a/tests/baselines/reference/ambientShorthand_declarationEmit.types +++ b/tests/baselines/reference/ambientShorthand_declarationEmit.types @@ -1,4 +1,4 @@ === tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : any + diff --git a/tests/baselines/reference/ambientShorthand_duplicate.symbols b/tests/baselines/reference/ambientShorthand_duplicate.symbols index 05856b47b92af..6d5716a193c49 100644 --- a/tests/baselines/reference/ambientShorthand_duplicate.symbols +++ b/tests/baselines/reference/ambientShorthand_duplicate.symbols @@ -6,5 +6,5 @@ import foo from "foo"; === tests/cases/conformance/ambient/declarations1.d.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : Symbol("foo", Decl(declarations1.d.ts, 0, 0)) + diff --git a/tests/baselines/reference/ambientShorthand_duplicate.types b/tests/baselines/reference/ambientShorthand_duplicate.types index 1520c5447ecd8..8abf9f7b230d7 100644 --- a/tests/baselines/reference/ambientShorthand_duplicate.types +++ b/tests/baselines/reference/ambientShorthand_duplicate.types @@ -6,5 +6,5 @@ import foo from "foo"; === tests/cases/conformance/ambient/declarations1.d.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : any + diff --git a/tests/baselines/reference/ambientShorthand_merging.symbols b/tests/baselines/reference/ambientShorthand_merging.symbols index 8a0ca5acb74eb..d37bdb060789d 100644 --- a/tests/baselines/reference/ambientShorthand_merging.symbols +++ b/tests/baselines/reference/ambientShorthand_merging.symbols @@ -7,5 +7,5 @@ import foo, {bar} from "foo"; === tests/cases/conformance/ambient/declarations1.d.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : Symbol("foo", Decl(declarations1.d.ts, 0, 0)) + diff --git a/tests/baselines/reference/ambientShorthand_merging.types b/tests/baselines/reference/ambientShorthand_merging.types index 78390a35dd836..ad9827f47ebab 100644 --- a/tests/baselines/reference/ambientShorthand_merging.types +++ b/tests/baselines/reference/ambientShorthand_merging.types @@ -7,5 +7,5 @@ import foo, {bar} from "foo"; === tests/cases/conformance/ambient/declarations1.d.ts === declare module "foo"; -No type information for this code. -No type information for this code. \ No newline at end of file +>"foo" : any + diff --git a/tests/baselines/reference/ambientShorthand_reExport.symbols b/tests/baselines/reference/ambientShorthand_reExport.symbols index 1e8d531801115..3aa3ddcec3d48 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.symbols +++ b/tests/baselines/reference/ambientShorthand_reExport.symbols @@ -1,7 +1,8 @@ === tests/cases/conformance/ambient/declarations.d.ts === declare module "jquery"; -No type information for this code. -No type information for this code.=== tests/cases/conformance/ambient/reExportX.ts === +>"jquery" : Symbol("jquery", Decl(declarations.d.ts, 0, 0)) + +=== tests/cases/conformance/ambient/reExportX.ts === export {x} from "jquery"; >x : Symbol(x, Decl(reExportX.ts, 0, 8)) diff --git a/tests/baselines/reference/ambientShorthand_reExport.types b/tests/baselines/reference/ambientShorthand_reExport.types index 5765c7e033176..e3e6c9742fdc4 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.types +++ b/tests/baselines/reference/ambientShorthand_reExport.types @@ -1,7 +1,8 @@ === tests/cases/conformance/ambient/declarations.d.ts === declare module "jquery"; -No type information for this code. -No type information for this code.=== tests/cases/conformance/ambient/reExportX.ts === +>"jquery" : any + +=== tests/cases/conformance/ambient/reExportX.ts === export {x} from "jquery"; >x : any diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols index ce63368333991..4bd6397936dee 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols @@ -4,9 +4,11 @@ class S { 1: string; } >S : Symbol(S, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 0, 0)) +>1 : Symbol(S[1], Decl(assignmentCompatWithObjectMembersNumericNames.ts, 3, 9)) class T { 1.: string; } >T : Symbol(T, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 3, 22)) +>1. : Symbol(T[1.], Decl(assignmentCompatWithObjectMembersNumericNames.ts, 4, 9)) var s: S; >s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3)) @@ -18,10 +20,12 @@ var t: T; interface S2 { 1: string; bar?: string } >S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 9)) +>1 : Symbol(S2[1], Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 14)) >bar : Symbol(S2.bar, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 25)) interface T2 { 1.0: string; baz?: string } >T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 40)) +>1.0 : Symbol(T2[1.0], Decl(assignmentCompatWithObjectMembersNumericNames.ts, 9, 14)) >baz : Symbol(T2.baz, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 9, 27)) var s2: S2; @@ -34,17 +38,21 @@ var t2: T2; var a: { 1.: string; bar?: string } >a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3)) +>1. : Symbol(1., Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 8)) >bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 20)) var b: { 1.0: string; baz?: string } >b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3)) +>1.0 : Symbol(1.0, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 8)) >baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 21)) var a2 = { 1.0: '' }; >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3)) +>1.0 : Symbol(1.0, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 10)) var b2 = { 1: '' }; >b2 : Symbol(b2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 17, 3)) +>1 : Symbol(1, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 17, 10)) s = t; >s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3)) diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types index 0c44316d3249b..aea92a9aa3f9d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types @@ -4,9 +4,11 @@ class S { 1: string; } >S : S +>1 : string class T { 1.: string; } >T : T +>1. : string var s: S; >s : S @@ -18,10 +20,12 @@ var t: T; interface S2 { 1: string; bar?: string } >S2 : S2 +>1 : string >bar : string interface T2 { 1.0: string; baz?: string } >T2 : T2 +>1.0 : string >baz : string var s2: S2; @@ -34,20 +38,24 @@ var t2: T2; var a: { 1.: string; bar?: string } >a : { 1.: string; bar?: string; } +>1. : string >bar : string var b: { 1.0: string; baz?: string } >b : { 1.0: string; baz?: string; } +>1.0 : string >baz : string var a2 = { 1.0: '' }; >a2 : { 1.0: string; } >{ 1.0: '' } : { 1.0: string; } +>1.0 : string >'' : "" var b2 = { 1: '' }; >b2 : { 1: string; } >{ 1: '' } : { 1: string; } +>1 : string >'' : "" s = t; diff --git a/tests/baselines/reference/augmentExportEquals3.symbols b/tests/baselines/reference/augmentExportEquals3.symbols index 06ac04b39f39c..e4e7a8e1a5f23 100644 --- a/tests/baselines/reference/augmentExportEquals3.symbols +++ b/tests/baselines/reference/augmentExportEquals3.symbols @@ -22,6 +22,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : Symbol(x, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8)) + interface A { a } >A : Symbol(A, Decl(file2.ts, 4, 26)) >a : Symbol(A.a, Decl(file2.ts, 5, 17)) diff --git a/tests/baselines/reference/augmentExportEquals3.types b/tests/baselines/reference/augmentExportEquals3.types index 37362bc9649fa..67aa8399af349 100644 --- a/tests/baselines/reference/augmentExportEquals3.types +++ b/tests/baselines/reference/augmentExportEquals3.types @@ -25,6 +25,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : typeof x + interface A { a } >A : A >a : any diff --git a/tests/baselines/reference/augmentExportEquals3_1.symbols b/tests/baselines/reference/augmentExportEquals3_1.symbols index ad3505c2835ca..2431b293deae2 100644 --- a/tests/baselines/reference/augmentExportEquals3_1.symbols +++ b/tests/baselines/reference/augmentExportEquals3_1.symbols @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) + function foo(): void; >foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8)) @@ -26,6 +28,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "file1" { +>"file1" : Symbol(x, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 25), Decl(file2.ts, 2, 8)) + interface A { a } >A : Symbol(A, Decl(file2.ts, 5, 24)) >a : Symbol(A.a, Decl(file2.ts, 6, 17)) diff --git a/tests/baselines/reference/augmentExportEquals3_1.types b/tests/baselines/reference/augmentExportEquals3_1.types index 2457e91530a14..f841fb315352e 100644 --- a/tests/baselines/reference/augmentExportEquals3_1.types +++ b/tests/baselines/reference/augmentExportEquals3_1.types @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : typeof "file1" + function foo(): void; >foo : typeof foo @@ -28,6 +30,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "file1" { +>"file1" : typeof x + interface A { a } >A : A >a : any diff --git a/tests/baselines/reference/augmentExportEquals4.symbols b/tests/baselines/reference/augmentExportEquals4.symbols index 2a4e3dbc1471b..f1f637625457c 100644 --- a/tests/baselines/reference/augmentExportEquals4.symbols +++ b/tests/baselines/reference/augmentExportEquals4.symbols @@ -22,6 +22,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : Symbol(x, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8)) + interface A { a } >A : Symbol(A, Decl(file2.ts, 4, 26)) >a : Symbol(A.a, Decl(file2.ts, 5, 17)) diff --git a/tests/baselines/reference/augmentExportEquals4.types b/tests/baselines/reference/augmentExportEquals4.types index 295156ffb590f..c2823d794e0eb 100644 --- a/tests/baselines/reference/augmentExportEquals4.types +++ b/tests/baselines/reference/augmentExportEquals4.types @@ -25,6 +25,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : typeof x + interface A { a } >A : A >a : any diff --git a/tests/baselines/reference/augmentExportEquals4_1.symbols b/tests/baselines/reference/augmentExportEquals4_1.symbols index 1488645898c99..d2a3c0018252e 100644 --- a/tests/baselines/reference/augmentExportEquals4_1.symbols +++ b/tests/baselines/reference/augmentExportEquals4_1.symbols @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) + class foo {} >foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8)) @@ -26,6 +28,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "file1" { +>"file1" : Symbol(x, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 2, 8)) + interface A { a } >A : Symbol(A, Decl(file2.ts, 5, 24)) >a : Symbol(A.a, Decl(file2.ts, 6, 17)) diff --git a/tests/baselines/reference/augmentExportEquals4_1.types b/tests/baselines/reference/augmentExportEquals4_1.types index 8eaf1c6cbbaaf..9daf444e41937 100644 --- a/tests/baselines/reference/augmentExportEquals4_1.types +++ b/tests/baselines/reference/augmentExportEquals4_1.types @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : typeof "file1" + class foo {} >foo : foo @@ -28,6 +30,8 @@ x.b = 1; // OK - './file1' is a namespace declare module "file1" { +>"file1" : typeof x + interface A { a } >A : A >a : any diff --git a/tests/baselines/reference/augmentExportEquals5.symbols b/tests/baselines/reference/augmentExportEquals5.symbols index d55e8eed0218d..0bf821f6cadd0 100644 --- a/tests/baselines/reference/augmentExportEquals5.symbols +++ b/tests/baselines/reference/augmentExportEquals5.symbols @@ -13,6 +13,8 @@ declare module Express { } declare module "express" { +>"express" : Symbol("express", Decl(express.d.ts, 4, 1)) + function e(): e.Express; >e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29)) >e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28)) @@ -167,6 +169,8 @@ import * as e from "express"; >e : Symbol(e, Decl(augmentation.ts, 1, 6)) declare module "express" { +>"express" : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29)) + interface Request { >Request : Symbol(Request, Decl(express.d.ts, 25, 49), Decl(augmentation.ts, 2, 26)) diff --git a/tests/baselines/reference/augmentExportEquals5.types b/tests/baselines/reference/augmentExportEquals5.types index c0444d35358fc..eaa956e1d4e9c 100644 --- a/tests/baselines/reference/augmentExportEquals5.types +++ b/tests/baselines/reference/augmentExportEquals5.types @@ -13,6 +13,8 @@ declare module Express { } declare module "express" { +>"express" : typeof "express" + function e(): e.Express; >e : typeof e >e : any @@ -167,6 +169,8 @@ import * as e from "express"; >e : typeof e declare module "express" { +>"express" : typeof e + interface Request { >Request : Request diff --git a/tests/baselines/reference/augmentExportEquals6.symbols b/tests/baselines/reference/augmentExportEquals6.symbols index 33ec14ed3346c..2125b650464af 100644 --- a/tests/baselines/reference/augmentExportEquals6.symbols +++ b/tests/baselines/reference/augmentExportEquals6.symbols @@ -28,6 +28,8 @@ x.B.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : Symbol(x, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10)) + interface A { a: number } >A : Symbol(A, Decl(file1.ts, 1, 15), Decl(file2.ts, 4, 26)) >a : Symbol(A.a, Decl(file2.ts, 5, 17)) diff --git a/tests/baselines/reference/augmentExportEquals6.types b/tests/baselines/reference/augmentExportEquals6.types index 01b7095b1693a..6948535c6da02 100644 --- a/tests/baselines/reference/augmentExportEquals6.types +++ b/tests/baselines/reference/augmentExportEquals6.types @@ -30,6 +30,8 @@ x.B.b = 1; // OK - './file1' is a namespace declare module "./file1" { +>"./file1" : typeof x + interface A { a: number } >A : A >a : number diff --git a/tests/baselines/reference/augmentExportEquals6_1.symbols b/tests/baselines/reference/augmentExportEquals6_1.symbols index 60f8b84565777..b75f8131c0175 100644 --- a/tests/baselines/reference/augmentExportEquals6_1.symbols +++ b/tests/baselines/reference/augmentExportEquals6_1.symbols @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) + class foo {} >foo : Symbol(foo, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28)) @@ -21,6 +23,8 @@ import x = require("file1"); // OK - './file1' is a namespace declare module "file1" { +>"file1" : Symbol(x, Decl(file1.d.ts, 0, 24), Decl(file1.d.ts, 1, 16), Decl(file2.ts, 1, 28)) + interface A { a: number } >A : Symbol(A, Decl(file1.d.ts, 2, 19), Decl(file2.ts, 4, 24)) >a : Symbol(A.a, Decl(file2.ts, 5, 17)) diff --git a/tests/baselines/reference/augmentExportEquals6_1.types b/tests/baselines/reference/augmentExportEquals6_1.types index a6041ecda8103..6929d99ad51c7 100644 --- a/tests/baselines/reference/augmentExportEquals6_1.types +++ b/tests/baselines/reference/augmentExportEquals6_1.types @@ -1,5 +1,7 @@ === tests/cases/compiler/file1.d.ts === declare module "file1" { +>"file1" : typeof "file1" + class foo {} >foo : foo @@ -21,6 +23,8 @@ import x = require("file1"); // OK - './file1' is a namespace declare module "file1" { +>"file1" : typeof x + interface A { a: number } >A : A >a : number diff --git a/tests/baselines/reference/bangInModuleName.symbols b/tests/baselines/reference/bangInModuleName.symbols index 08bcf487cc8cb..ca3d4a161f590 100644 --- a/tests/baselines/reference/bangInModuleName.symbols +++ b/tests/baselines/reference/bangInModuleName.symbols @@ -6,9 +6,12 @@ import * as http from 'intern/dojo/node!http'; === tests/cases/compiler/a.d.ts === declare module "http" { +>"http" : Symbol("http", Decl(a.d.ts, 0, 0)) } declare module 'intern/dojo/node!http' { +>'intern/dojo/node!http' : Symbol('intern/dojo/node!http', Decl(a.d.ts, 1, 1)) + import http = require('http'); >http : Symbol(http, Decl(a.d.ts, 3, 40)) diff --git a/tests/baselines/reference/bangInModuleName.types b/tests/baselines/reference/bangInModuleName.types index 93115f76a0ead..691ac6add0087 100644 --- a/tests/baselines/reference/bangInModuleName.types +++ b/tests/baselines/reference/bangInModuleName.types @@ -6,9 +6,12 @@ import * as http from 'intern/dojo/node!http'; === tests/cases/compiler/a.d.ts === declare module "http" { +>"http" : typeof "http" } declare module 'intern/dojo/node!http' { +>'intern/dojo/node!http' : typeof 'intern/dojo/node!http' + import http = require('http'); >http : typeof http diff --git a/tests/baselines/reference/binaryIntegerLiteral.symbols b/tests/baselines/reference/binaryIntegerLiteral.symbols index 31e28819657b0..fb15a8b6e6ca0 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.symbols +++ b/tests/baselines/reference/binaryIntegerLiteral.symbols @@ -15,6 +15,8 @@ var obj1 = { >obj1 : Symbol(obj1, Decl(binaryIntegerLiteral.ts, 5, 3)) 0b11010: "Hello", +>0b11010 : Symbol(0b11010, Decl(binaryIntegerLiteral.ts, 5, 12)) + a: bin1, >a : Symbol(a, Decl(binaryIntegerLiteral.ts, 6, 21)) >bin1 : Symbol(bin1, Decl(binaryIntegerLiteral.ts, 0, 3)) @@ -26,12 +28,15 @@ var obj1 = { >b : Symbol(b, Decl(binaryIntegerLiteral.ts, 8, 9)) 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, +>0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111 : Symbol(0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111, Decl(binaryIntegerLiteral.ts, 9, 15)) } var obj2 = { >obj2 : Symbol(obj2, Decl(binaryIntegerLiteral.ts, 13, 3)) 0B11010: "World", +>0B11010 : Symbol(0B11010, Decl(binaryIntegerLiteral.ts, 13, 12)) + a: bin2, >a : Symbol(a, Decl(binaryIntegerLiteral.ts, 14, 21)) >bin2 : Symbol(bin2, Decl(binaryIntegerLiteral.ts, 1, 3)) @@ -43,6 +48,7 @@ var obj2 = { >b : Symbol(b, Decl(binaryIntegerLiteral.ts, 16, 9)) 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, +>0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111 : Symbol(0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111, Decl(binaryIntegerLiteral.ts, 17, 15)) } obj1[0b11010]; // string diff --git a/tests/baselines/reference/binaryIntegerLiteral.types b/tests/baselines/reference/binaryIntegerLiteral.types index 5cee371fdbeb7..070ae22d79661 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.types +++ b/tests/baselines/reference/binaryIntegerLiteral.types @@ -20,6 +20,7 @@ var obj1 = { >{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0b11010: "Hello", +>0b11010 : string >"Hello" : "Hello" a: bin1, @@ -34,6 +35,7 @@ var obj1 = { >0b11010 : 26 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, +>0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111 : boolean >true : true } @@ -42,6 +44,7 @@ var obj2 = { >{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0B11010: "World", +>0B11010 : string >"World" : "World" a: bin2, @@ -56,6 +59,7 @@ var obj2 = { >0B11010 : 26 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, +>0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111 : boolean >false : false } diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.symbols b/tests/baselines/reference/binaryIntegerLiteralES6.symbols index 4fb7aaff82dcf..15c8c633019e3 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.symbols +++ b/tests/baselines/reference/binaryIntegerLiteralES6.symbols @@ -15,6 +15,8 @@ var obj1 = { >obj1 : Symbol(obj1, Decl(binaryIntegerLiteralES6.ts, 5, 3)) 0b11010: "Hello", +>0b11010 : Symbol(0b11010, Decl(binaryIntegerLiteralES6.ts, 5, 12)) + a: bin1, >a : Symbol(a, Decl(binaryIntegerLiteralES6.ts, 6, 21)) >bin1 : Symbol(bin1, Decl(binaryIntegerLiteralES6.ts, 0, 3)) @@ -26,12 +28,15 @@ var obj1 = { >b : Symbol(b, Decl(binaryIntegerLiteralES6.ts, 8, 9)) 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, +>0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111 : Symbol(0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111, Decl(binaryIntegerLiteralES6.ts, 9, 15)) } var obj2 = { >obj2 : Symbol(obj2, Decl(binaryIntegerLiteralES6.ts, 13, 3)) 0B11010: "World", +>0B11010 : Symbol(0B11010, Decl(binaryIntegerLiteralES6.ts, 13, 12)) + a: bin2, >a : Symbol(a, Decl(binaryIntegerLiteralES6.ts, 14, 21)) >bin2 : Symbol(bin2, Decl(binaryIntegerLiteralES6.ts, 1, 3)) @@ -43,6 +48,7 @@ var obj2 = { >b : Symbol(b, Decl(binaryIntegerLiteralES6.ts, 16, 9)) 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, +>0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111 : Symbol(0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111, Decl(binaryIntegerLiteralES6.ts, 17, 15)) } obj1[0b11010]; // string diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.types b/tests/baselines/reference/binaryIntegerLiteralES6.types index ab28010283bea..fe9f65a1f7163 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.types +++ b/tests/baselines/reference/binaryIntegerLiteralES6.types @@ -20,6 +20,7 @@ var obj1 = { >{ 0b11010: "Hello", a: bin1, bin1, b: 0b11010, 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,} : { 0b11010: string; a: number; bin1: number; b: number; 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0b11010: "Hello", +>0b11010 : string >"Hello" : "Hello" a: bin1, @@ -34,6 +35,7 @@ var obj1 = { >0b11010 : 26 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, +>0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111 : boolean >true : true } @@ -42,6 +44,7 @@ var obj2 = { >{ 0B11010: "World", a: bin2, bin2, b: 0B11010, 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,} : { 0B11010: string; a: number; bin2: number; b: number; 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: boolean; } 0B11010: "World", +>0B11010 : string >"World" : "World" a: bin2, @@ -56,6 +59,7 @@ var obj2 = { >0B11010 : 26 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, +>0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111 : boolean >false : false } diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols index 24783a153ae88..e734966c59419 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols @@ -5,6 +5,7 @@ enum ENUM1 { A, B, "" }; >ENUM1 : Symbol(ENUM1, Decl(bitwiseNotOperatorWithEnumType.ts, 0, 0)) >A : Symbol(ENUM1.A, Decl(bitwiseNotOperatorWithEnumType.ts, 2, 12)) >B : Symbol(ENUM1.B, Decl(bitwiseNotOperatorWithEnumType.ts, 2, 15)) +>"" : Symbol(ENUM1[""], Decl(bitwiseNotOperatorWithEnumType.ts, 2, 18)) // enum type var var ResultIsNumber1 = ~ENUM1; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types index 03008f67d110b..bf1fc1091e51b 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types @@ -5,6 +5,7 @@ enum ENUM1 { A, B, "" }; >ENUM1 : ENUM1 >A : ENUM1.A >B : ENUM1.B +>"" : ENUM1."" // enum type var var ResultIsNumber1 = ~ENUM1; diff --git a/tests/baselines/reference/cachedModuleResolution6.trace.json b/tests/baselines/reference/cachedModuleResolution6.trace.json index 50c1c15b3e1be..efb20f4ddc1be 100644 --- a/tests/baselines/reference/cachedModuleResolution6.trace.json +++ b/tests/baselines/reference/cachedModuleResolution6.trace.json @@ -15,6 +15,13 @@ "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Loading module 'foo' from 'node_modules' folder, target file type 'Json'.", + "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name 'foo' was not resolved. ========", "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", diff --git a/tests/baselines/reference/cachedModuleResolution7.trace.json b/tests/baselines/reference/cachedModuleResolution7.trace.json index fa1db9d115e28..74c57e042503a 100644 --- a/tests/baselines/reference/cachedModuleResolution7.trace.json +++ b/tests/baselines/reference/cachedModuleResolution7.trace.json @@ -11,6 +11,11 @@ "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Loading module 'foo' from 'node_modules' folder, target file type 'Json'.", + "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", + "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name 'foo' was not resolved. ========", "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols index b09c819cf65e8..e55bfd99aa8e4 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols @@ -27,6 +27,7 @@ class C { >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; +>0 : Symbol(C[0], Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 8, 24)) } interface I { @@ -51,6 +52,7 @@ interface I { >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; +>0 : Symbol(I[0], Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 17, 24)) } var c: C; diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.types b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.types index 272ba94f7f22d..65e01240b7229 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.types +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.types @@ -29,6 +29,7 @@ class C { >Object : Object 0: number; +>0 : number } interface I { @@ -53,6 +54,7 @@ interface I { >Object : Object 0: number; +>0 : number } var c: C; diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols index 80658b0531c6b..ab33778751712 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols @@ -27,6 +27,7 @@ class C { >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; +>0 : Symbol(C[0], Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 8, 24)) public static foo: string; // doesn't effect equivalence >foo : Symbol(C.foo, Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 9, 14)) @@ -54,6 +55,7 @@ interface I { >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; +>0 : Symbol(I[0], Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 19, 24)) } var c: C; diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.types b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.types index 22440da176824..a5fbc06e0af16 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.types +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.types @@ -29,6 +29,7 @@ class C { >Object : Object 0: number; +>0 : number public static foo: string; // doesn't effect equivalence >foo : string @@ -56,6 +57,7 @@ interface I { >Object : Object 0: number; +>0 : number } var c: C; diff --git a/tests/baselines/reference/commonSourceDirectory.symbols b/tests/baselines/reference/commonSourceDirectory.symbols index 5409286ede59e..89233ddd3cca4 100644 --- a/tests/baselines/reference/commonSourceDirectory.symbols +++ b/tests/baselines/reference/commonSourceDirectory.symbols @@ -18,6 +18,8 @@ export const x = 0; === /types/bar.d.ts === declare module "bar" { +>"bar" : Symbol("bar", Decl(bar.d.ts, 0, 0)) + export const y = 0; >y : Symbol(y, Decl(bar.d.ts, 1, 16)) } diff --git a/tests/baselines/reference/commonSourceDirectory.types b/tests/baselines/reference/commonSourceDirectory.types index ce0169582d784..ea16e24b8513f 100644 --- a/tests/baselines/reference/commonSourceDirectory.types +++ b/tests/baselines/reference/commonSourceDirectory.types @@ -20,6 +20,8 @@ export const x = 0; === /types/bar.d.ts === declare module "bar" { +>"bar" : typeof "bar" + export const y = 0; >y : 0 >0 : 0 diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.symbols b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.symbols index fb303b1f8b371..23179820592b2 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.symbols @@ -23,6 +23,8 @@ foo({ >p : Symbol(p, Decl(computedPropertyNamesContextualType6_ES5.ts, 6, 5)) 0: () => { }, +>0 : Symbol(0, Decl(computedPropertyNamesContextualType6_ES5.ts, 7, 10)) + ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types index f144bb9d020e9..de6474695a45a 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types @@ -26,6 +26,7 @@ foo({ >"" : "" 0: () => { }, +>0 : () => void >() => { } : () => void ["hi" + "bye"]: true, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.symbols b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.symbols index b3e371447e200..d441c593fb3e1 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.symbols @@ -23,6 +23,8 @@ foo({ >p : Symbol(p, Decl(computedPropertyNamesContextualType6_ES6.ts, 6, 5)) 0: () => { }, +>0 : Symbol(0, Decl(computedPropertyNamesContextualType6_ES6.ts, 7, 10)) + ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types index 6b8c8ae2e34fc..07110d604e29b 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types @@ -26,6 +26,7 @@ foo({ >"" : "" 0: () => { }, +>0 : () => void >() => { } : () => void ["hi" + "bye"]: true, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.symbols b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.symbols index d6889f9912d93..77e87a5bf4891 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.symbols @@ -36,6 +36,8 @@ foo({ >foo : Symbol(foo, Decl(computedPropertyNamesContextualType7_ES5.ts, 5, 1)) 0: () => { }, +>0 : Symbol(0, Decl(computedPropertyNamesContextualType7_ES5.ts, 10, 5)) + ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types index b77a129a0b43e..e838c06bfa160 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.types @@ -38,6 +38,7 @@ foo({ >{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | (() => void) | number[]; [x: number]: number | (() => void) | number[]; 0: () => void; } 0: () => { }, +>0 : () => void >() => { } : () => void ["hi" + "bye"]: true, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.symbols b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.symbols index d04c8f913bdbb..5f798731dbabf 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.symbols @@ -36,6 +36,8 @@ foo({ >foo : Symbol(foo, Decl(computedPropertyNamesContextualType7_ES6.ts, 5, 1)) 0: () => { }, +>0 : Symbol(0, Decl(computedPropertyNamesContextualType7_ES6.ts, 10, 5)) + ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types index f041b2b4eb49a..ace52b05bcbb7 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.types @@ -38,6 +38,7 @@ foo({ >{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | (() => void) | number[]; [x: number]: number | (() => void) | number[]; 0: () => void; } 0: () => { }, +>0 : () => void >() => { } : () => void ["hi" + "bye"]: true, diff --git a/tests/baselines/reference/constEnumPropertyAccess1.symbols b/tests/baselines/reference/constEnumPropertyAccess1.symbols index 63861a94ae1e6..a2b4ed6a9a12a 100644 --- a/tests/baselines/reference/constEnumPropertyAccess1.symbols +++ b/tests/baselines/reference/constEnumPropertyAccess1.symbols @@ -30,6 +30,8 @@ var o: { } = { 1: true +>1 : Symbol(1, Decl(constEnumPropertyAccess1.ts, 13, 5)) + }; var a = G.A; diff --git a/tests/baselines/reference/constEnumPropertyAccess1.types b/tests/baselines/reference/constEnumPropertyAccess1.types index af9aacd279cab..5ef286e6b8f3d 100644 --- a/tests/baselines/reference/constEnumPropertyAccess1.types +++ b/tests/baselines/reference/constEnumPropertyAccess1.types @@ -37,6 +37,7 @@ var o: { >{ 1: true } : { 1: true; } 1: true +>1 : boolean >true : true }; diff --git a/tests/baselines/reference/constIndexedAccess.symbols b/tests/baselines/reference/constIndexedAccess.symbols index ef2be6368e344..658a30c99a617 100644 --- a/tests/baselines/reference/constIndexedAccess.symbols +++ b/tests/baselines/reference/constIndexedAccess.symbols @@ -13,7 +13,10 @@ interface indexAccess { >indexAccess : Symbol(indexAccess, Decl(constIndexedAccess.ts, 3, 1)) 0: string; +>0 : Symbol(indexAccess[0], Decl(constIndexedAccess.ts, 5, 23)) + 1: number; +>1 : Symbol(indexAccess[1], Decl(constIndexedAccess.ts, 6, 14)) } let test: indexAccess; diff --git a/tests/baselines/reference/constIndexedAccess.types b/tests/baselines/reference/constIndexedAccess.types index e63852c1ab12f..2a753814d409f 100644 --- a/tests/baselines/reference/constIndexedAccess.types +++ b/tests/baselines/reference/constIndexedAccess.types @@ -13,7 +13,10 @@ interface indexAccess { >indexAccess : indexAccess 0: string; +>0 : string + 1: number; +>1 : number } let test: indexAccess; diff --git a/tests/baselines/reference/contextualTypeArrayReturnType.symbols b/tests/baselines/reference/contextualTypeArrayReturnType.symbols index 2982a1ce893af..0688e810c08f7 100644 --- a/tests/baselines/reference/contextualTypeArrayReturnType.symbols +++ b/tests/baselines/reference/contextualTypeArrayReturnType.symbols @@ -33,6 +33,8 @@ var style: IBookStyle = { return [ {'ry': null } +>'ry' : Symbol('ry', Decl(contextualTypeArrayReturnType.ts, 15, 13)) + ]; } } diff --git a/tests/baselines/reference/contextualTypeArrayReturnType.types b/tests/baselines/reference/contextualTypeArrayReturnType.types index 6c91fd7b8b964..aee8eae59f5a1 100644 --- a/tests/baselines/reference/contextualTypeArrayReturnType.types +++ b/tests/baselines/reference/contextualTypeArrayReturnType.types @@ -38,6 +38,7 @@ var style: IBookStyle = { {'ry': null } >{'ry': null } : { 'ry': null; } +>'ry' : null >null : null ]; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols index 985bb52f243d9..207b4dab689cb 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols @@ -24,6 +24,7 @@ interface IWithNoNumberIndexSignature { >IWithNoNumberIndexSignature : Symbol(IWithNoNumberIndexSignature, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 11, 1)) 0: string; +>0 : Symbol(IWithNoNumberIndexSignature[0], Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 12, 39)) } interface IWithStringIndexSignature1 { >IWithStringIndexSignature1 : Symbol(IWithStringIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 14, 1)) @@ -113,6 +114,7 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 1: a => a } >x3 : Symbol(x3, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 51, 3)) >IWithNoNumberIndexSignature : Symbol(IWithNoNumberIndexSignature, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 11, 1)) >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) +>1 : Symbol(1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 68)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 71)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 71)) @@ -120,6 +122,7 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 0: a => a } >x3 : Symbol(x3, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 51, 3)) >IWithNoNumberIndexSignature : Symbol(IWithNoNumberIndexSignature, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 11, 1)) >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) +>0 : Symbol(0, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 68)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 71)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 71)) @@ -127,11 +130,13 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 0: "hello" >x3 : Symbol(x3, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 49, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 50, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 51, 3)) >IWithNoNumberIndexSignature : Symbol(IWithNoNumberIndexSignature, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 11, 1)) >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) +>0 : Symbol(0, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 51, 68)) var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a.toString() }; // a should be number >x4 : Symbol(x4, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 3)) >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) >IWithNumberIndexSignature2 : Symbol(IWithNumberIndexSignature2, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 23, 1)) +>1 : Symbol(1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 67)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 70)) >a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 70)) @@ -141,6 +146,7 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a }; >x4 : Symbol(x4, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 3)) >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) >IWithNumberIndexSignature2 : Symbol(IWithNumberIndexSignature2, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 23, 1)) +>1 : Symbol(1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 67)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 70)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 70)) diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types index 97c5f0fdf9035..c44afae7cd507 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.types @@ -24,6 +24,7 @@ interface IWithNoNumberIndexSignature { >IWithNoNumberIndexSignature : IWithNoNumberIndexSignature 0: string; +>0 : string } interface IWithStringIndexSignature1 { >IWithStringIndexSignature1 : IWithStringIndexSignature1 @@ -125,6 +126,7 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 1: a => a } >IWithNoNumberIndexSignature : IWithNoNumberIndexSignature >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 >{ 1: a => a } : { 1: (a: number) => number; } +>1 : (a: number) => number >a => a : (a: number) => number >a : number >a : number @@ -134,6 +136,7 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 0: a => a } >IWithNoNumberIndexSignature : IWithNoNumberIndexSignature >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 >{ 0: a => a } : { 0: (a: any) => any; } +>0 : (a: any) => any >a => a : (a: any) => any >a : any >a : any @@ -143,6 +146,7 @@ var x3: IWithNoNumberIndexSignature | IWithNumberIndexSignature1 = { 0: "hello" >IWithNoNumberIndexSignature : IWithNoNumberIndexSignature >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 >{ 0: "hello" } : { 0: string; } +>0 : string >"hello" : "hello" var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a.toString() }; // a should be number @@ -150,6 +154,7 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a.to >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 >IWithNumberIndexSignature2 : IWithNumberIndexSignature2 >{ 1: a => a.toString() } : { 1: (a: number) => string; } +>1 : (a: number) => string >a => a.toString() : (a: number) => string >a : number >a.toString() : string @@ -162,6 +167,7 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a }; >IWithNumberIndexSignature1 : IWithNumberIndexSignature1 >IWithNumberIndexSignature2 : IWithNumberIndexSignature2 >{ 1: a => a } : { 1: (a: number) => number; } +>1 : (a: number) => number >a => a : (a: number) => number >a : number >a : number diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols index b0338f1c803f8..f8a1dfe2ef420 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols @@ -25,5 +25,5 @@ let k =