Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
@@ -4370,6 +4370,9 @@ namespace ts {
return [symbol!];
}
}
if (meaning !== SymbolFlags.Value && symbolFromSymbolTable.flags & SymbolFlags.TypeAlias && isAccessible(symbolFromSymbolTable, getDeclaredTypeOfTypeAlias(symbolFromSymbolTable).symbol)) {
return [symbolFromSymbolTable];
}
});

// If there's no result and we're looking at the global symbol table, treat `globalThis` like an alias and try to lookup thru that
@@ -5866,9 +5869,6 @@ namespace ts {
if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
parameterType = getOptionalType(parameterType);
}
if ((context.flags & NodeBuilderFlags.NoUndefinedOptionalParameterType) && parameterDeclaration && !isJSDocParameterTag(parameterDeclaration) && isOptionalUninitializedParameter(parameterDeclaration)) {
parameterType = getTypeWithFacts(parameterType, TypeFacts.NEUndefined);
}
const parameterTypeNode = serializeTypeForDeclaration(context, parameterType, parameterSymbol, context.enclosingDeclaration, privateSymbolVisitor, bundledImports);

const modifiers = !(context.flags & NodeBuilderFlags.OmitParameterModifiers) && preserveModifierFlags && parameterDeclaration && parameterDeclaration.modifiers ? parameterDeclaration.modifiers.map(factory.cloneNode) : undefined;
@@ -6495,7 +6495,7 @@ namespace ts {
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
// try to reuse the existing annotation
const existing = getEffectiveTypeAnnotationNode(declWithExistingAnnotation)!;
if (getTypeFromTypeNode(existing) === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) {
if (typeNodeIsEquivalentToType(existing, declWithExistingAnnotation, type) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) {
const result = serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled);
if (result) {
return result;
@@ -6513,6 +6513,17 @@ namespace ts {
return result;
}

function typeNodeIsEquivalentToType(typeNode: TypeNode, annotatedDeclaration: Declaration, type: Type) {
const typeFromTypeNode = getTypeFromTypeNode(typeNode);
if (typeFromTypeNode === type) {
return true;
}
if (isParameter(annotatedDeclaration) && annotatedDeclaration.questionToken) {
return getTypeWithFacts(type, TypeFacts.NEUndefined) === typeFromTypeNode;
}
return false;
}

function serializeReturnTypeForSignature(context: NodeBuilderContext, type: Type, signature: Signature, includePrivateSymbol?: (s: Symbol) => void, bundled?: boolean) {
if (!isErrorType(type) && context.enclosingDeclaration) {
const annotation = signature.declaration && getEffectiveReturnTypeNode(signature.declaration);
@@ -42445,12 +42456,6 @@ namespace ts {
hasSyntacticModifier(parameter, ModifierFlags.ParameterPropertyModifier);
}

function isOptionalUninitializedParameter(parameter: ParameterDeclaration) {
return !!strictNullChecks &&
isOptionalParameter(parameter) &&
!parameter.initializer;
}

function isExpandoFunctionDeclaration(node: Declaration): boolean {
const declaration = getParseTreeNode(node, isFunctionDeclaration);
if (!declaration) {
1 change: 0 additions & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
@@ -4488,7 +4488,6 @@ namespace ts {
UseAliasDefinedOutsideCurrentScope = 1 << 14, // Allow non-visible aliases
UseSingleQuotesForStringLiteralType = 1 << 28, // Use single quotes for string literal type
NoTypeReduction = 1 << 29, // Don't call getReducedType
NoUndefinedOptionalParameterType = 1 << 30, // Do not add undefined to optional parameter type

// Error handling
AllowThisInObjectLiteral = 1 << 15,
4 changes: 4 additions & 0 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
@@ -7655,4 +7655,8 @@ namespace ts {

return state > States.NodeModules ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : undefined;
}

export function getParameterTypeNode(parameter: ParameterDeclaration | JSDocParameterTag) {
return parameter.kind === SyntaxKind.JSDocParameterTag ? parameter.typeExpression?.type : parameter.type;
}
}
2 changes: 1 addition & 1 deletion src/services/codefixes/helpers.ts
Original file line number Diff line number Diff line change
@@ -192,7 +192,7 @@ namespace ts.codefix {
const program = context.program;
const checker = program.getTypeChecker();
const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());
const flags = NodeBuilderFlags.NoTruncation | NodeBuilderFlags.NoUndefinedOptionalParameterType | NodeBuilderFlags.SuppressAnyReturnType | (quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : 0);
const flags = NodeBuilderFlags.NoTruncation | NodeBuilderFlags.SuppressAnyReturnType | (quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : 0);
const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)) as ArrowFunction | FunctionExpression | MethodDeclaration;
if (!signatureDeclaration) {
return undefined;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts ===
type T = { x : number }
>T : Symbol(T, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 0))
>x : Symbol(x, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 10))
>x : Symbol(T.x, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 10))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I saw 100+ baselines changed, I thought I had done something horribly wrong, but... this seems like an improvement?


export interface I {
>I : Symbol(I, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 23))
4 changes: 2 additions & 2 deletions tests/baselines/reference/accessorBodyInTypeContext.symbols
Original file line number Diff line number Diff line change
@@ -3,15 +3,15 @@ type A = {
>A : Symbol(A, Decl(accessorBodyInTypeContext.ts, 0, 0))

get foo() { return 0 }
>foo : Symbol(foo, Decl(accessorBodyInTypeContext.ts, 0, 10))
>foo : Symbol(A.foo, Decl(accessorBodyInTypeContext.ts, 0, 10))

};

type B = {
>B : Symbol(B, Decl(accessorBodyInTypeContext.ts, 2, 2))

set foo(v: any) { }
>foo : Symbol(foo, Decl(accessorBodyInTypeContext.ts, 4, 10))
>foo : Symbol(B.foo, Decl(accessorBodyInTypeContext.ts, 4, 10))
>v : Symbol(v, Decl(accessorBodyInTypeContext.ts, 5, 12))

};
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export var a = vextend({
>val : Symbol(val, Decl(app.js, 4, 10))

this.data2 = 1;
>this : Symbol(__type, Decl(lib.es5.d.ts, --, --))
>this : Symbol(Record, Decl(lib.es5.d.ts, --, --))
>data2 : Symbol(data2, Decl(app.js, 4, 16), Decl(app.js, 6, 6))

},
1 change: 0 additions & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
@@ -2391,7 +2391,6 @@ declare namespace ts {
UseAliasDefinedOutsideCurrentScope = 16384,
UseSingleQuotesForStringLiteralType = 268435456,
NoTypeReduction = 536870912,
NoUndefinedOptionalParameterType = 1073741824,
AllowThisInObjectLiteral = 32768,
AllowQualifiedNameInPlaceOfIdentifier = 65536,
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
1 change: 0 additions & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
@@ -2391,7 +2391,6 @@ declare namespace ts {
UseAliasDefinedOutsideCurrentScope = 16384,
UseSingleQuotesForStringLiteralType = 268435456,
NoTypeReduction = 536870912,
NoUndefinedOptionalParameterType = 1073741824,
AllowThisInObjectLiteral = 32768,
AllowQualifiedNameInPlaceOfIdentifier = 65536,
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
6 changes: 3 additions & 3 deletions tests/baselines/reference/argumentsAsPropertyName.symbols
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ type MyType = {
>MyType : Symbol(MyType, Decl(argumentsAsPropertyName.ts, 0, 0))

arguments: Array<string>
>arguments : Symbol(arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>arguments : Symbol(MyType.arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
}

@@ -24,9 +24,9 @@ function myFunction(myType: MyType) {

use(myType.arguments[i]);
>use : Symbol(use, Decl(argumentsAsPropertyName.ts, 3, 1))
>myType.arguments : Symbol(arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>myType.arguments : Symbol(MyType.arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>myType : Symbol(myType, Decl(argumentsAsPropertyName.ts, 7, 20))
>arguments : Symbol(arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>arguments : Symbol(MyType.arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
>i : Symbol(i, Decl(argumentsAsPropertyName.ts, 8, 12))

// create closure so that tsc will turn loop body into function
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ type BadFlatArray<Arr, Depth extends number> = {obj: {
>1 : 1

declare function flat<A, D extends number = 1>(
>flat : <A, D extends number = 1>(arr: A, depth?: D | undefined) => BadFlatArray<A, D>[]
>flat : <A, D extends number = 1>(arr: A, depth?: D) => BadFlatArray<A, D>[]

arr: A,
>arr : A
2 changes: 1 addition & 1 deletion tests/baselines/reference/assertionTypePredicates1.types
Original file line number Diff line number Diff line change
@@ -270,7 +270,7 @@ namespace Debug {
>Debug : typeof Debug

export declare function assert(value: unknown, message?: string): asserts value;
>assert : (value: unknown, message?: string | undefined) => asserts value
>assert : (value: unknown, message?: string) => asserts value
>value : unknown
>message : string | undefined

Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ namespace Example1 {

type S = { done: boolean, value: number };
>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 3, 20))
>done : Symbol(done, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 14))
>value : Symbol(value, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 29))
>done : Symbol(S.done, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 14))
>value : Symbol(S.value, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 29))

type T =
>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 46))
@@ -42,8 +42,8 @@ namespace Example2 {

type S = { a: 0 | 2, b: 4 };
>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 18, 20))
>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 14))
>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 24))
>a : Symbol(S.a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 14))
>b : Symbol(S.b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 24))

type T = { a: 0, b: 1 | 4 } // T0
>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 32))
@@ -79,8 +79,8 @@ namespace Example3 {

type S = { a: 0 | 2, b: 4 };
>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 32, 20))
>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 14))
>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 24))
>a : Symbol(S.a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 14))
>b : Symbol(S.b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 24))

type T = { a: 0, b: 1 | 4 } // T0
>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 32))
@@ -117,8 +117,8 @@ namespace Example4 {

type S = { a: 0 | 2, b: 4 };
>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 47, 20))
>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 14))
>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 24))
>a : Symbol(S.a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 14))
>b : Symbol(S.b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 24))

type T = { a: 0, b: 1 | 4 } // T0
>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 32))
@@ -161,11 +161,11 @@ namespace Example5 {

type S = { a: N, b: N, c: N };
>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 65, 23))
>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 14))
>a : Symbol(S.a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 14))
>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20))
>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 20))
>b : Symbol(S.b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 20))
>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20))
>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 26))
>c : Symbol(S.c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 26))
>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20))

type T = { a: 0, b: N, c: N }
@@ -273,10 +273,10 @@ namespace GH14865 {
>Style2 : Symbol(Style2, Decl(assignmentCompatWithDiscriminatedUnion.ts, 92, 6))

type: "A" | "B";
>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))
>type : Symbol(Style2.type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))

data: string;
>data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 95, 24))
>data : Symbol(Style2.data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 95, 24))
}

const a: Style2 = { type: "A", data: "whatevs" };
@@ -290,9 +290,9 @@ namespace GH14865 {
>Style1 : Symbol(Style1, Decl(assignmentCompatWithDiscriminatedUnion.ts, 85, 19))

a.type; // "A" | "B"
>a.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))
>a.type : Symbol(Style2.type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))
>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 9))
>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))
>type : Symbol(Style2.type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19))

b.type; // "A" | "B"
>b.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19), Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9))
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ declare function resolve2<T>(value: T): Windows.Foundation.IPromise<T>;
>Foundation : any

async function sample2(x?: number) {
>sample2 : (x?: number | undefined) => Promise<void>
>sample2 : (x?: number) => Promise<void>
>x : number | undefined

let x1 = await resolve1(x);
2 changes: 1 addition & 1 deletion tests/baselines/reference/awaitedType.symbols
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ type T4 = Awaited<number | Promise<string>>;
type T5 = Awaited<{ then: number }>;
>T5 : Symbol(T5, Decl(awaitedType.ts, 3, 44))
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --))
>then : Symbol(then, Decl(awaitedType.ts, 4, 19))
>then : Symbol(T5.then, Decl(awaitedType.ts, 4, 19))

type T6 = Awaited<{ then(): void }>; // never (non-promise "thenable")
>T6 : Symbol(T6, Decl(awaitedType.ts, 4, 36))
2 changes: 1 addition & 1 deletion tests/baselines/reference/awaitedTypeStrictNull.symbols
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ type T4 = Awaited<number | Promise<string>>;
type T5 = Awaited<{ then: number }>;
>T5 : Symbol(T5, Decl(awaitedTypeStrictNull.ts, 3, 44))
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --))
>then : Symbol(then, Decl(awaitedTypeStrictNull.ts, 4, 19))
>then : Symbol(T5.then, Decl(awaitedTypeStrictNull.ts, 4, 19))

type T6 = Awaited<{ then(): void }>; // never (non-promise "thenable")
>T6 : Symbol(T6, Decl(awaitedTypeStrictNull.ts, 4, 36))
8 changes: 4 additions & 4 deletions tests/baselines/reference/callWithSpread4.symbols
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
=== tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts ===
type R = { a: number }
>R : Symbol(R, Decl(callWithSpread4.ts, 0, 0))
>a : Symbol(a, Decl(callWithSpread4.ts, 0, 10))
>a : Symbol(R.a, Decl(callWithSpread4.ts, 0, 10))

type W = { b: number }
>W : Symbol(W, Decl(callWithSpread4.ts, 0, 22))
>b : Symbol(b, Decl(callWithSpread4.ts, 1, 10))
>b : Symbol(W.b, Decl(callWithSpread4.ts, 1, 10))

type RW = { a: number, b: number }
>RW : Symbol(RW, Decl(callWithSpread4.ts, 1, 22))
>a : Symbol(a, Decl(callWithSpread4.ts, 2, 11))
>b : Symbol(b, Decl(callWithSpread4.ts, 2, 22))
>a : Symbol(RW.a, Decl(callWithSpread4.ts, 2, 11))
>b : Symbol(RW.b, Decl(callWithSpread4.ts, 2, 22))

declare const pli: {
>pli : Symbol(pli, Decl(callWithSpread4.ts, 3, 13))
10 changes: 5 additions & 5 deletions tests/baselines/reference/callsOnComplexSignatures.types
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ function test3(items: string[] | number[]) {
}

function test4(
>test4 : (arg1: ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number), arg2: ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number), arg3: ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number), arg4: ((a?: { x: number; } | undefined, b?: { x: number; } | undefined) => number) | ((a?: { y: number; } | undefined) => number), arg5: ((a?: { x: number; } | undefined, ...b: { x: number;}[]) => number) | ((a?: { y: number; } | undefined) => number), arg6: ((a?: { x: number; } | undefined, b?: { x: number; } | undefined) => number) | ((...a: { y: number;}[]) => number)) => void
>test4 : (arg1: ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number), arg2: ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number), arg3: ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number), arg4: ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number), arg5: ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number), arg6: ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number)) => void

arg1: ((...objs: {x: number}[]) => number) | ((...objs: {y: number}[]) => number),
>arg1 : ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number)
@@ -138,7 +138,7 @@ function test4(
>x : number

arg4: ((a?: {x: number}, b?: {x: number}) => number) | ((a?: {y: number}) => number),
>arg4 : ((a?: { x: number; } | undefined, b?: { x: number; } | undefined) => number) | ((a?: { y: number; } | undefined) => number)
>arg4 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little annoying but I guess it’s a general problem with reusing type annotation nodes, not specific to this change 🤔

>a : { x: number; } | undefined
>x : number
>b : { x: number; } | undefined
@@ -147,7 +147,7 @@ function test4(
>y : number

arg5: ((a?: {x: number}, ...b: {x: number}[]) => number) | ((a?: {y: number}) => number),
>arg5 : ((a?: { x: number; } | undefined, ...b: { x: number;}[]) => number) | ((a?: { y: number; } | undefined) => number)
>arg5 : ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number)
>a : { x: number; } | undefined
>x : number
>b : { x: number; }[]
@@ -156,7 +156,7 @@ function test4(
>y : number

arg6: ((a?: {x: number}, b?: {x: number}) => number) | ((...a: {y: number}[]) => number),
>arg6 : ((a?: { x: number; } | undefined, b?: { x: number; } | undefined) => number) | ((...a: { y: number;}[]) => number)
>arg6 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number)
>a : { x: number; } | undefined
>x : number
>b : { x: number; } | undefined
@@ -339,7 +339,7 @@ function test5() {

// Pair of non-like intrinsics
function render(url?: string): React.ReactNode {
>render : (url?: string | undefined) => React.ReactNode
>render : (url?: string) => React.ReactNode
>url : string | undefined
>React : any

Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ export type TypeA = {
>TypeA : Symbol(TypeA, Decl(type-a.ts, 0, 0))

a: string;
>a : Symbol(a, Decl(type-a.ts, 0, 21))
>a : Symbol(TypeA.a, Decl(type-a.ts, 0, 21))
}
=== tests/cases/compiler/Uppercased_Dir/src/types.ts ===
export type Merge<T, U> = T & U;
2 changes: 1 addition & 1 deletion tests/baselines/reference/checkJsdocTypeTag4.symbols
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
type A<T extends string> = { a: T }
>A : Symbol(A, Decl(t.d.ts, 0, 0))
>T : Symbol(T, Decl(t.d.ts, 0, 7))
>a : Symbol(a, Decl(t.d.ts, 0, 28))
>a : Symbol(A.a, Decl(t.d.ts, 0, 28))
>T : Symbol(T, Decl(t.d.ts, 0, 7))

=== tests/cases/conformance/jsdoc/test.js ===
12 changes: 6 additions & 6 deletions tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ function foo(opts) {
>opts : Symbol(opts, Decl(0.js, 10, 13))

opts.x;
>opts.x : Symbol(x, Decl(0.js, 3, 3))
>opts.x : Symbol(Opts.x, Decl(0.js, 3, 3))
>opts : Symbol(opts, Decl(0.js, 10, 13))
>x : Symbol(x, Decl(0.js, 3, 3))
>x : Symbol(Opts.x, Decl(0.js, 3, 3))
}

foo({x: 'abc'});
@@ -35,9 +35,9 @@ function foo1(opts) {
>opts : Symbol(opts, Decl(0.js, 23, 14))

opts.anotherX;
>opts.anotherX : Symbol(anotherX, Decl(0.js, 18, 3))
>opts.anotherX : Symbol(AnotherOpts.anotherX, Decl(0.js, 18, 3))
>opts : Symbol(opts, Decl(0.js, 23, 14))
>anotherX : Symbol(anotherX, Decl(0.js, 18, 3))
>anotherX : Symbol(AnotherOpts.anotherX, Decl(0.js, 18, 3))
}

foo1({anotherX: "world"});
@@ -58,9 +58,9 @@ function foo2(opts) {
>opts : Symbol(opts, Decl(0.js, 38, 14))

opts.x;
>opts.x : Symbol(x, Decl(0.js, 31, 3))
>opts.x : Symbol(Opts1.x, Decl(0.js, 31, 3))
>opts : Symbol(opts, Decl(0.js, 38, 14))
>x : Symbol(x, Decl(0.js, 31, 3))
>x : Symbol(Opts1.x, Decl(0.js, 31, 3))
}
foo2({x: 'abc'});
>foo2 : Symbol(foo2, Decl(0.js, 27, 26))
4 changes: 2 additions & 2 deletions tests/baselines/reference/checkerInitializationCrash.symbols
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ declare global {
export import VNode = react.ReactNode;
>VNode : Symbol(FullCalendarVDom.VNode, Decl(index.d.ts, 2, 30))
>react : Symbol(react, Decl(index.d.ts, 0, 6))
>ReactNode : Symbol(react.ReactNode, Decl(index.d.ts, 2, 25), Decl(index.d.ts, 2, 30))
>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 2, 25), Decl(index.d.ts, 2, 30))
}
}

@@ -30,7 +30,7 @@ declare global {
>FullCalendarVDom : Symbol(FullCalendarVDom, Decl(index.d.ts, 1, 16), Decl(index.d.ts, 1, 16))

type VNode = preact.VNode<any>;
>VNode : Symbol(React.ReactNode, Decl(index.d.ts, 2, 25), Decl(index.d.ts, 2, 30))
>VNode : Symbol(ReactNode, Decl(index.d.ts, 2, 25), Decl(index.d.ts, 2, 30))
>preact : Symbol(preact, Decl(index.d.ts, 0, 6))
>VNode : Symbol(preact.VNode, Decl(index.d.ts, 0, 27))
}
8 changes: 4 additions & 4 deletions tests/baselines/reference/circularAccessorAnnotations.symbols
Original file line number Diff line number Diff line change
@@ -38,15 +38,15 @@ type T1 = {
>T1 : Symbol(T1, Decl(circularAccessorAnnotations.ts, 11, 1))

get foo(): T1["foo"];
>foo : Symbol(foo, Decl(circularAccessorAnnotations.ts, 13, 11))
>foo : Symbol(T1.foo, Decl(circularAccessorAnnotations.ts, 13, 11))
>T1 : Symbol(T1, Decl(circularAccessorAnnotations.ts, 11, 1))
}

type T2 = {
>T2 : Symbol(T2, Decl(circularAccessorAnnotations.ts, 15, 1))

set foo(value: T2["foo"]);
>foo : Symbol(foo, Decl(circularAccessorAnnotations.ts, 17, 11))
>foo : Symbol(T2.foo, Decl(circularAccessorAnnotations.ts, 17, 11))
>value : Symbol(value, Decl(circularAccessorAnnotations.ts, 18, 12))
>T2 : Symbol(T2, Decl(circularAccessorAnnotations.ts, 15, 1))
}
@@ -55,10 +55,10 @@ type T3 = {
>T3 : Symbol(T3, Decl(circularAccessorAnnotations.ts, 19, 1))

get foo(): string;
>foo : Symbol(foo, Decl(circularAccessorAnnotations.ts, 21, 11), Decl(circularAccessorAnnotations.ts, 22, 22))
>foo : Symbol(T3.foo, Decl(circularAccessorAnnotations.ts, 21, 11), Decl(circularAccessorAnnotations.ts, 22, 22))

set foo(value: T3["foo"]);
>foo : Symbol(foo, Decl(circularAccessorAnnotations.ts, 21, 11), Decl(circularAccessorAnnotations.ts, 22, 22))
>foo : Symbol(T3.foo, Decl(circularAccessorAnnotations.ts, 21, 11), Decl(circularAccessorAnnotations.ts, 22, 22))
>value : Symbol(value, Decl(circularAccessorAnnotations.ts, 23, 12))
>T3 : Symbol(T3, Decl(circularAccessorAnnotations.ts, 19, 1))
}
2 changes: 1 addition & 1 deletion tests/baselines/reference/circularBaseTypes.symbols
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
type M<T> = { value: T };
>M : Symbol(M, Decl(circularBaseTypes.ts, 0, 0))
>T : Symbol(T, Decl(circularBaseTypes.ts, 2, 7))
>value : Symbol(value, Decl(circularBaseTypes.ts, 2, 13))
>value : Symbol(M.value, Decl(circularBaseTypes.ts, 2, 13))
>T : Symbol(T, Decl(circularBaseTypes.ts, 2, 7))

interface M2 extends M<M3> {}; // Error
10 changes: 5 additions & 5 deletions tests/baselines/reference/circularIndexedAccessErrors.symbols
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ type T1 = {
>T1 : Symbol(T1, Decl(circularIndexedAccessErrors.ts, 0, 0))

x: T1["x"]; // Error
>x : Symbol(x, Decl(circularIndexedAccessErrors.ts, 0, 11))
>x : Symbol(T1.x, Decl(circularIndexedAccessErrors.ts, 0, 11))
>T1 : Symbol(T1, Decl(circularIndexedAccessErrors.ts, 0, 0))

};
@@ -13,13 +13,13 @@ type T2<K extends "x" | "y"> = {
>K : Symbol(K, Decl(circularIndexedAccessErrors.ts, 4, 8))

x: T2<K>[K]; // Error
>x : Symbol(x, Decl(circularIndexedAccessErrors.ts, 4, 32))
>x : Symbol(T2.x, Decl(circularIndexedAccessErrors.ts, 4, 32))
>T2 : Symbol(T2, Decl(circularIndexedAccessErrors.ts, 2, 2))
>K : Symbol(K, Decl(circularIndexedAccessErrors.ts, 4, 8))
>K : Symbol(K, Decl(circularIndexedAccessErrors.ts, 4, 8))

y: number;
>y : Symbol(y, Decl(circularIndexedAccessErrors.ts, 5, 16))
>y : Symbol(T2.y, Decl(circularIndexedAccessErrors.ts, 5, 16))
}

declare let x2: T2<"x">;
@@ -28,9 +28,9 @@ declare let x2: T2<"x">;

let x2x = x2.x;
>x2x : Symbol(x2x, Decl(circularIndexedAccessErrors.ts, 10, 3))
>x2.x : Symbol(x, Decl(circularIndexedAccessErrors.ts, 4, 32))
>x2.x : Symbol(T2.x, Decl(circularIndexedAccessErrors.ts, 4, 32))
>x2 : Symbol(x2, Decl(circularIndexedAccessErrors.ts, 9, 11))
>x : Symbol(x, Decl(circularIndexedAccessErrors.ts, 4, 32))
>x : Symbol(T2.x, Decl(circularIndexedAccessErrors.ts, 4, 32))

interface T3<T extends T3<T>> {
>T3 : Symbol(T3, Decl(circularIndexedAccessErrors.ts, 10, 15))
2 changes: 1 addition & 1 deletion tests/baselines/reference/circularOptionalityRemoval.types
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ function fn1(x: number | undefined = x > 0 ? x : 0) { }

// Report from user
function fn2(x?: string = someCondition ? 'value1' : x) { }
>fn2 : (x?: string | undefined) => void
>fn2 : (x?: string) => void
>x : string | undefined
>someCondition ? 'value1' : x : string | undefined
>someCondition : any
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== tests/cases/compiler/coAndContraVariantInferences.ts ===
type A = { kind: 'a' };
>A : Symbol(A, Decl(coAndContraVariantInferences.ts, 0, 0))
>kind : Symbol(kind, Decl(coAndContraVariantInferences.ts, 0, 10))
>kind : Symbol(A.kind, Decl(coAndContraVariantInferences.ts, 0, 10))

type B = { kind: 'b' };
>B : Symbol(B, Decl(coAndContraVariantInferences.ts, 0, 23))
>kind : Symbol(kind, Decl(coAndContraVariantInferences.ts, 1, 10))
>kind : Symbol(B.kind, Decl(coAndContraVariantInferences.ts, 1, 10))

declare const a: A;
>a : Symbol(a, Decl(coAndContraVariantInferences.ts, 3, 13))
2 changes: 1 addition & 1 deletion tests/baselines/reference/computedPropertyName.symbols
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ type T = {
>T : Symbol(T, Decl(component.ts, 4, 1))

[onInit]: any;
>[onInit] : Symbol([onInit], Decl(component.ts, 6, 10))
>[onInit] : Symbol(T[onInit], Decl(component.ts, 6, 10))
>onInit : Symbol(onInit, Decl(component.ts, 0, 13))
}

Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@ type IndexObject = { [key: string]: unknown; };

type FooBar = { foo: "hello"; bar: "world"; };
>FooBar : Symbol(FooBar, Decl(computedTypesKeyofNoIndexSignatureType.ts, 11, 47))
>foo : Symbol(foo, Decl(computedTypesKeyofNoIndexSignatureType.ts, 12, 15))
>bar : Symbol(bar, Decl(computedTypesKeyofNoIndexSignatureType.ts, 12, 29))
>foo : Symbol(FooBar.foo, Decl(computedTypesKeyofNoIndexSignatureType.ts, 12, 15))
>bar : Symbol(FooBar.bar, Decl(computedTypesKeyofNoIndexSignatureType.ts, 12, 29))

type WithIndex = Compute<FooBar & IndexObject>; // { [x: string]: {}; foo: "hello"; bar: "world"; } <-- OK
>WithIndex : Symbol(WithIndex, Decl(computedTypesKeyofNoIndexSignatureType.ts, 12, 46))
Original file line number Diff line number Diff line change
@@ -270,7 +270,7 @@ function testAssignabilityToConditionalType<T>() {
type Wrapped<T> = { ___secret: T };
>Wrapped : Symbol(Wrapped, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 79, 1))
>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 13))
>___secret : Symbol(___secret, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 19))
>___secret : Symbol(Wrapped.___secret, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 19))
>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 13))

type Unwrap<T> = T extends Wrapped<infer U> ? U : T;
8 changes: 4 additions & 4 deletions tests/baselines/reference/conditionalTypes1.symbols
Original file line number Diff line number Diff line change
@@ -124,8 +124,8 @@ type Options = { k: "a", a: number } | { k: "b", b: string } | { k: "c", c: bool
>a : Symbol(a, Decl(conditionalTypes1.ts, 33, 24))
>k : Symbol(k, Decl(conditionalTypes1.ts, 33, 40))
>b : Symbol(b, Decl(conditionalTypes1.ts, 33, 48))
>k : Symbol(k, Decl(conditionalTypes1.ts, 33, 64))
>c : Symbol(c, Decl(conditionalTypes1.ts, 33, 72))
>k : Symbol(T10.k, Decl(conditionalTypes1.ts, 33, 64))
>c : Symbol(T10.c, Decl(conditionalTypes1.ts, 33, 72))

type T10 = Exclude<Options, { k: "a" | "b" }>; // { k: "c", c: boolean }
>T10 : Symbol(T10, Decl(conditionalTypes1.ts, 33, 86))
@@ -254,13 +254,13 @@ type T23 = TypeName<{}>; // "object"
type KnockoutObservable<T> = { object: T };
>KnockoutObservable : Symbol(KnockoutObservable, Decl(conditionalTypes1.ts, 66, 24))
>T : Symbol(T, Decl(conditionalTypes1.ts, 68, 24))
>object : Symbol(object, Decl(conditionalTypes1.ts, 68, 30))
>object : Symbol(KnockoutObservable.object, Decl(conditionalTypes1.ts, 68, 30))
>T : Symbol(T, Decl(conditionalTypes1.ts, 68, 24))

type KnockoutObservableArray<T> = { array: T };
>KnockoutObservableArray : Symbol(KnockoutObservableArray, Decl(conditionalTypes1.ts, 68, 43))
>T : Symbol(T, Decl(conditionalTypes1.ts, 69, 29))
>array : Symbol(array, Decl(conditionalTypes1.ts, 69, 35))
>array : Symbol(KnockoutObservableArray.array, Decl(conditionalTypes1.ts, 69, 35))
>T : Symbol(T, Decl(conditionalTypes1.ts, 69, 29))

type KnockedOut<T> = T extends any[] ? KnockoutObservableArray<T[number]> : KnockoutObservable<T>;
10 changes: 5 additions & 5 deletions tests/baselines/reference/conditionalTypes2.symbols
Original file line number Diff line number Diff line change
@@ -175,11 +175,11 @@ function f12(x: string | (() => string) | undefined) {

type Foo = { foo: string };
>Foo : Symbol(Foo, Decl(conditionalTypes2.ts, 55, 1))
>foo : Symbol(foo, Decl(conditionalTypes2.ts, 57, 12))
>foo : Symbol(Foo.foo, Decl(conditionalTypes2.ts, 57, 12))

type Bar = { bar: string };
>Bar : Symbol(Bar, Decl(conditionalTypes2.ts, 57, 27))
>bar : Symbol(bar, Decl(conditionalTypes2.ts, 58, 12))
>bar : Symbol(Bar.bar, Decl(conditionalTypes2.ts, 58, 12))

declare function fooBar(x: { foo: string, bar: string }): void;
>fooBar : Symbol(fooBar, Decl(conditionalTypes2.ts, 58, 27))
@@ -589,9 +589,9 @@ type Product<A extends Union, B> = { f1: A, f2: B};
>A : Symbol(A, Decl(conditionalTypes2.ts, 159, 13))
>Union : Symbol(Union, Decl(conditionalTypes2.ts, 154, 36))
>B : Symbol(B, Decl(conditionalTypes2.ts, 159, 29))
>f1 : Symbol(f1, Decl(conditionalTypes2.ts, 159, 36))
>f1 : Symbol(Product.f1, Decl(conditionalTypes2.ts, 159, 36))
>A : Symbol(A, Decl(conditionalTypes2.ts, 159, 13))
>f2 : Symbol(f2, Decl(conditionalTypes2.ts, 159, 43))
>f2 : Symbol(Product.f2, Decl(conditionalTypes2.ts, 159, 43))
>B : Symbol(B, Decl(conditionalTypes2.ts, 159, 29))

type ProductUnion = Product<'a', 0> | Product<'b', 1>;
@@ -771,7 +771,7 @@ declare type IResponse<T> = {
>T : Symbol(T, Decl(conditionalTypes2.ts, 219, 23))

sendValue(name: keyof GetAllPropertiesOfType<T, string>): void;
>sendValue : Symbol(sendValue, Decl(conditionalTypes2.ts, 219, 29))
>sendValue : Symbol(IResponse.sendValue, Decl(conditionalTypes2.ts, 219, 29))
>name : Symbol(name, Decl(conditionalTypes2.ts, 220, 11))
>GetAllPropertiesOfType : Symbol(GetAllPropertiesOfType, Decl(conditionalTypes2.ts, 225, 28))
>T : Symbol(T, Decl(conditionalTypes2.ts, 219, 23))
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== tests/cases/compiler/contextualTypingArrayDestructuringWithDefaults.ts ===
type I = { a: "a" };
>I : Symbol(I, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 0))
>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 10))
>a : Symbol(I.a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 10))

let [ c0 = {a: "a"} ]: [I?] = [];
>c0 : Symbol(c0, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 1, 5))
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@ type Box<T> = {
>T : Symbol(T, Decl(contextuallyTypedBooleanLiterals.ts, 2, 9))

get: () => T,
>get : Symbol(get, Decl(contextuallyTypedBooleanLiterals.ts, 2, 15))
>get : Symbol(Box.get, Decl(contextuallyTypedBooleanLiterals.ts, 2, 15))
>T : Symbol(T, Decl(contextuallyTypedBooleanLiterals.ts, 2, 9))

set: (value: T) => void
>set : Symbol(set, Decl(contextuallyTypedBooleanLiterals.ts, 3, 17))
>set : Symbol(Box.set, Decl(contextuallyTypedBooleanLiterals.ts, 3, 17))
>value : Symbol(value, Decl(contextuallyTypedBooleanLiterals.ts, 4, 10))
>T : Symbol(T, Decl(contextuallyTypedBooleanLiterals.ts, 2, 9))
}
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ declare function id4<T extends (x: { foo?: number }) => any>(input: T): T;
>input : T

declare function id5<T extends (x?: number) => any>(input: T): T;
>id5 : <T extends (x?: number | undefined) => any>(input: T) => T
>id5 : <T extends (x?: number) => any>(input: T) => T
>x : number | undefined
>input : T

2 changes: 1 addition & 1 deletion tests/baselines/reference/controlFlowAliasing.types
Original file line number Diff line number Diff line change
@@ -532,7 +532,7 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu
}

function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
>f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined) => void
>f28 : (obj?: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined
>kind : "foo"
>foo : string
18 changes: 9 additions & 9 deletions tests/baselines/reference/controlFlowForCatchAndFinally.symbols
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
=== tests/cases/compiler/controlFlowForCatchAndFinally.ts ===
type Page = {close(): Promise<void>; content(): Promise<string>};
>Page : Symbol(Page, Decl(controlFlowForCatchAndFinally.ts, 0, 0))
>close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
>close : Symbol(Page.close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>content : Symbol(content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))
>content : Symbol(Page.content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))

type Browser = {close(): Promise<void>};
>Browser : Symbol(Browser, Decl(controlFlowForCatchAndFinally.ts, 0, 65))
>close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
>close : Symbol(Browser.close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))

declare function test1(): Promise<Browser>;
@@ -48,27 +48,27 @@ async function test(): Promise<string> {
>browser : Symbol(browser, Decl(controlFlowForCatchAndFinally.ts, 5, 7))

return await page.content();;
>page.content : Symbol(content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))
>page.content : Symbol(Page.content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))
>page : Symbol(page, Decl(controlFlowForCatchAndFinally.ts, 6, 7))
>content : Symbol(content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))
>content : Symbol(Page.content, Decl(controlFlowForCatchAndFinally.ts, 0, 36))

} finally {
if (page) {
>page : Symbol(page, Decl(controlFlowForCatchAndFinally.ts, 6, 7))

await page.close(); // ok
>page.close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
>page.close : Symbol(Page.close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
>page : Symbol(page, Decl(controlFlowForCatchAndFinally.ts, 6, 7))
>close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
>close : Symbol(Page.close, Decl(controlFlowForCatchAndFinally.ts, 0, 13))
}

if (browser) {
>browser : Symbol(browser, Decl(controlFlowForCatchAndFinally.ts, 5, 7))

await browser.close(); // ok
>browser.close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
>browser.close : Symbol(Browser.close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
>browser : Symbol(browser, Decl(controlFlowForCatchAndFinally.ts, 5, 7))
>close : Symbol(close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
>close : Symbol(Browser.close, Decl(controlFlowForCatchAndFinally.ts, 1, 16))
}
}
}
4 changes: 2 additions & 2 deletions tests/baselines/reference/controlFlowForInStatement2.symbols
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ const keywordB = 'b';

type A = { [keywordA]: number };
>A : Symbol(A, Decl(controlFlowForInStatement2.ts, 1, 21))
>[keywordA] : Symbol([keywordA], Decl(controlFlowForInStatement2.ts, 3, 10))
>[keywordA] : Symbol(A[keywordA], Decl(controlFlowForInStatement2.ts, 3, 10))
>keywordA : Symbol(keywordA, Decl(controlFlowForInStatement2.ts, 0, 5))

type B = { [keywordB]: string };
>B : Symbol(B, Decl(controlFlowForInStatement2.ts, 3, 32))
>[keywordB] : Symbol([keywordB], Decl(controlFlowForInStatement2.ts, 4, 10))
>[keywordB] : Symbol(B[keywordB], Decl(controlFlowForInStatement2.ts, 4, 10))
>keywordB : Symbol(keywordB, Decl(controlFlowForInStatement2.ts, 1, 5))

declare const c: A | B;
38 changes: 19 additions & 19 deletions tests/baselines/reference/controlFlowGenericTypes.symbols
Original file line number Diff line number Diff line change
@@ -215,18 +215,18 @@ export function bounceAndTakeIfA<AB extends 'A' | 'B'>(value: AB): AB {

type Common = { id: number };
>Common : Symbol(Common, Decl(controlFlowGenericTypes.ts, 69, 1))
>id : Symbol(id, Decl(controlFlowGenericTypes.ts, 73, 15))
>id : Symbol(Common.id, Decl(controlFlowGenericTypes.ts, 73, 15))

type AA = { tag: 'A', id: number };
>AA : Symbol(AA, Decl(controlFlowGenericTypes.ts, 73, 29))
>tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 74, 11))
>id : Symbol(id, Decl(controlFlowGenericTypes.ts, 74, 21))
>tag : Symbol(AA.tag, Decl(controlFlowGenericTypes.ts, 74, 11))
>id : Symbol(AA.id, Decl(controlFlowGenericTypes.ts, 74, 21))

type BB = { tag: 'B', id: number, foo: number };
>BB : Symbol(BB, Decl(controlFlowGenericTypes.ts, 74, 35))
>tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 75, 11))
>id : Symbol(id, Decl(controlFlowGenericTypes.ts, 75, 21))
>foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>tag : Symbol(BB.tag, Decl(controlFlowGenericTypes.ts, 75, 11))
>id : Symbol(BB.id, Decl(controlFlowGenericTypes.ts, 75, 21))
>foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))

type MyUnion = AA | BB;
>MyUnion : Symbol(MyUnion, Decl(controlFlowGenericTypes.ts, 75, 48))
@@ -245,19 +245,19 @@ const fn = (value: MyUnion) => {
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 79, 12))

value.foo;
>value.foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value.foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 79, 12))
>foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
}
if (value.tag === 'B') {
>value.tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 74, 11), Decl(controlFlowGenericTypes.ts, 75, 11))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 79, 12))
>tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 74, 11), Decl(controlFlowGenericTypes.ts, 75, 11))

value.foo;
>value.foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value.foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 79, 12))
>foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
}
};

@@ -276,19 +276,19 @@ const fn2 = <T extends MyUnion>(value: T): MyUnion => {
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 89, 32))

value.foo;
>value.foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value.foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 89, 32))
>foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
}
if (value.tag === 'B') {
>value.tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 74, 11), Decl(controlFlowGenericTypes.ts, 75, 11))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 89, 32))
>tag : Symbol(tag, Decl(controlFlowGenericTypes.ts, 74, 11), Decl(controlFlowGenericTypes.ts, 75, 11))

value.foo;
>value.foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value.foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>value : Symbol(value, Decl(controlFlowGenericTypes.ts, 89, 32))
>foo : Symbol(foo, Decl(controlFlowGenericTypes.ts, 75, 33))
>foo : Symbol(BB.foo, Decl(controlFlowGenericTypes.ts, 75, 33))
}
};

@@ -298,16 +298,16 @@ type A1 = {
>A1 : Symbol(A1, Decl(controlFlowGenericTypes.ts, 97, 2))

testable: true
>testable : Symbol(testable, Decl(controlFlowGenericTypes.ts, 101, 11))
>testable : Symbol(A1.testable, Decl(controlFlowGenericTypes.ts, 101, 11))

doTest: () => void
>doTest : Symbol(doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
>doTest : Symbol(A1.doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
}
type B1 = {
>B1 : Symbol(B1, Decl(controlFlowGenericTypes.ts, 104, 1))

testable: false
>testable : Symbol(testable, Decl(controlFlowGenericTypes.ts, 105, 11))
>testable : Symbol(B1.testable, Decl(controlFlowGenericTypes.ts, 105, 11))

};

@@ -329,9 +329,9 @@ function notWorking<T extends Union>(object: T) {
>testable : Symbol(testable, Decl(controlFlowGenericTypes.ts, 101, 11), Decl(controlFlowGenericTypes.ts, 105, 11))

object.doTest();
>object.doTest : Symbol(doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
>object.doTest : Symbol(A1.doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
>object : Symbol(object, Decl(controlFlowGenericTypes.ts, 111, 37))
>doTest : Symbol(doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
>doTest : Symbol(A1.doTest, Decl(controlFlowGenericTypes.ts, 102, 18))
}

// Repro from #42939
6 changes: 3 additions & 3 deletions tests/baselines/reference/controlFlowInOperator.symbols
Original file line number Diff line number Diff line change
@@ -10,12 +10,12 @@ const d = 'd';

type A = { [a]: number; };
>A : Symbol(A, Decl(controlFlowInOperator.ts, 2, 14))
>[a] : Symbol([a], Decl(controlFlowInOperator.ts, 4, 10))
>[a] : Symbol(A[a], Decl(controlFlowInOperator.ts, 4, 10))
>a : Symbol(a, Decl(controlFlowInOperator.ts, 0, 5))

type B = { [b]: string; };
>B : Symbol(B, Decl(controlFlowInOperator.ts, 4, 26))
>[b] : Symbol([b], Decl(controlFlowInOperator.ts, 5, 10))
>[b] : Symbol(B[b], Decl(controlFlowInOperator.ts, 5, 10))
>b : Symbol(b, Decl(controlFlowInOperator.ts, 1, 5))

declare const c: A | B;
@@ -31,7 +31,7 @@ if ('a' in c) {

c['a']; // number;
>c : Symbol(c, Decl(controlFlowInOperator.ts, 7, 13))
>'a' : Symbol([a], Decl(controlFlowInOperator.ts, 4, 10))
>'a' : Symbol(A[a], Decl(controlFlowInOperator.ts, 4, 10))
}

if ('d' in c) {
608 changes: 304 additions & 304 deletions tests/baselines/reference/controlFlowOptionalChain.symbols

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/baselines/reference/controlFlowOptionalChain.types
Original file line number Diff line number Diff line change
@@ -1882,7 +1882,7 @@ type Shape =
>radius : number

function getArea(shape?: Shape) {
>getArea : (shape?: Shape | undefined) => number
>getArea : (shape?: Shape) => number
>shape : Shape | undefined

switch (shape?.type) {
26 changes: 13 additions & 13 deletions tests/baselines/reference/controlFlowOptionalChain2.symbols
Original file line number Diff line number Diff line change
@@ -3,17 +3,17 @@ type A = {
>A : Symbol(A, Decl(controlFlowOptionalChain2.ts, 0, 0))

type: 'A';
>type : Symbol(type, Decl(controlFlowOptionalChain2.ts, 0, 10))
>type : Symbol(A.type, Decl(controlFlowOptionalChain2.ts, 0, 10))

name: string;
>name : Symbol(name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>name : Symbol(A.name, Decl(controlFlowOptionalChain2.ts, 1, 12))
}

type B = {
>B : Symbol(B, Decl(controlFlowOptionalChain2.ts, 3, 1))

type: 'B';
>type : Symbol(type, Decl(controlFlowOptionalChain2.ts, 5, 10))
>type : Symbol(B.type, Decl(controlFlowOptionalChain2.ts, 5, 10))
}

function funcTwo(arg: A | B | undefined) {
@@ -37,9 +37,9 @@ function funcTwo(arg: A | B | undefined) {
>arg : Symbol(arg, Decl(controlFlowOptionalChain2.ts, 9, 17))

arg?.name;
>arg?.name : Symbol(name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>arg?.name : Symbol(A.name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>arg : Symbol(arg, Decl(controlFlowOptionalChain2.ts, 9, 17))
>name : Symbol(name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>name : Symbol(A.name, Decl(controlFlowOptionalChain2.ts, 1, 12))
}

function funcThree(arg: A | B | null) {
@@ -63,25 +63,25 @@ function funcThree(arg: A | B | null) {
>arg : Symbol(arg, Decl(controlFlowOptionalChain2.ts, 19, 19))

arg?.name;
>arg?.name : Symbol(name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>arg?.name : Symbol(A.name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>arg : Symbol(arg, Decl(controlFlowOptionalChain2.ts, 19, 19))
>name : Symbol(name, Decl(controlFlowOptionalChain2.ts, 1, 12))
>name : Symbol(A.name, Decl(controlFlowOptionalChain2.ts, 1, 12))
}

type U = { kind: undefined, u: 'u' }
>U : Symbol(U, Decl(controlFlowOptionalChain2.ts, 27, 1))
>kind : Symbol(kind, Decl(controlFlowOptionalChain2.ts, 29, 10))
>u : Symbol(u, Decl(controlFlowOptionalChain2.ts, 29, 27))
>kind : Symbol(U.kind, Decl(controlFlowOptionalChain2.ts, 29, 10))
>u : Symbol(U.u, Decl(controlFlowOptionalChain2.ts, 29, 27))

type N = { kind: null, n: 'n' }
>N : Symbol(N, Decl(controlFlowOptionalChain2.ts, 29, 36))
>kind : Symbol(kind, Decl(controlFlowOptionalChain2.ts, 30, 10))
>n : Symbol(n, Decl(controlFlowOptionalChain2.ts, 30, 22))
>kind : Symbol(N.kind, Decl(controlFlowOptionalChain2.ts, 30, 10))
>n : Symbol(N.n, Decl(controlFlowOptionalChain2.ts, 30, 22))

type X = { kind: 'X', x: 'x' }
>X : Symbol(X, Decl(controlFlowOptionalChain2.ts, 30, 31))
>kind : Symbol(kind, Decl(controlFlowOptionalChain2.ts, 31, 10))
>x : Symbol(x, Decl(controlFlowOptionalChain2.ts, 31, 21))
>kind : Symbol(X.kind, Decl(controlFlowOptionalChain2.ts, 31, 10))
>x : Symbol(X.x, Decl(controlFlowOptionalChain2.ts, 31, 21))

function f1(x: X | U | undefined) {
>f1 : Symbol(f1, Decl(controlFlowOptionalChain2.ts, 31, 30))
6 changes: 3 additions & 3 deletions tests/baselines/reference/controlFlowStringIndex.symbols
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ type A = {
>A : Symbol(A, Decl(controlFlowStringIndex.ts, 0, 0))

other: number | null;
>other : Symbol(other, Decl(controlFlowStringIndex.ts, 0, 10))
>other : Symbol(A.other, Decl(controlFlowStringIndex.ts, 0, 10))

[index: string]: number | null
>index : Symbol(index, Decl(controlFlowStringIndex.ts, 2, 5))
@@ -22,9 +22,9 @@ if (value.foo !== null) {
>toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --))

value.other // should still be number | null
>value.other : Symbol(other, Decl(controlFlowStringIndex.ts, 0, 10))
>value.other : Symbol(A.other, Decl(controlFlowStringIndex.ts, 0, 10))
>value : Symbol(value, Decl(controlFlowStringIndex.ts, 4, 13))
>other : Symbol(other, Decl(controlFlowStringIndex.ts, 0, 10))
>other : Symbol(A.other, Decl(controlFlowStringIndex.ts, 0, 10))

value.bar // should still be number | null
>value : Symbol(value, Decl(controlFlowStringIndex.ts, 4, 13))
48 changes: 24 additions & 24 deletions tests/baselines/reference/correlatedUnions.symbols
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@

type RecordMap = { n: number, s: string, b: boolean };
>RecordMap : Symbol(RecordMap, Decl(correlatedUnions.ts, 0, 0))
>n : Symbol(n, Decl(correlatedUnions.ts, 2, 18))
>s : Symbol(s, Decl(correlatedUnions.ts, 2, 29))
>b : Symbol(b, Decl(correlatedUnions.ts, 2, 40))
>n : Symbol(RecordMap.n, Decl(correlatedUnions.ts, 2, 18))
>s : Symbol(RecordMap.s, Decl(correlatedUnions.ts, 2, 29))
>b : Symbol(RecordMap.b, Decl(correlatedUnions.ts, 2, 40))

type UnionRecord<K extends keyof RecordMap = keyof RecordMap> = { [P in K]: {
>UnionRecord : Symbol(UnionRecord, Decl(correlatedUnions.ts, 2, 54))
@@ -80,32 +80,32 @@ processRecord({ kind: 'n', v: 42, f: v => v.toExponential() });

type TextFieldData = { value: string }
>TextFieldData : Symbol(TextFieldData, Decl(correlatedUnions.ts, 18, 63))
>value : Symbol(value, Decl(correlatedUnions.ts, 22, 22))
>value : Symbol(TextFieldData.value, Decl(correlatedUnions.ts, 22, 22))

type SelectFieldData = { options: string[], selectedValue: string }
>SelectFieldData : Symbol(SelectFieldData, Decl(correlatedUnions.ts, 22, 38))
>options : Symbol(options, Decl(correlatedUnions.ts, 23, 24))
>selectedValue : Symbol(selectedValue, Decl(correlatedUnions.ts, 23, 43))
>options : Symbol(SelectFieldData.options, Decl(correlatedUnions.ts, 23, 24))
>selectedValue : Symbol(SelectFieldData.selectedValue, Decl(correlatedUnions.ts, 23, 43))

type FieldMap = {
>FieldMap : Symbol(FieldMap, Decl(correlatedUnions.ts, 23, 67))

text: TextFieldData;
>text : Symbol(text, Decl(correlatedUnions.ts, 25, 17))
>text : Symbol(FieldMap.text, Decl(correlatedUnions.ts, 25, 17))
>TextFieldData : Symbol(TextFieldData, Decl(correlatedUnions.ts, 18, 63))

select: SelectFieldData;
>select : Symbol(select, Decl(correlatedUnions.ts, 26, 24))
>select : Symbol(FieldMap.select, Decl(correlatedUnions.ts, 26, 24))
>SelectFieldData : Symbol(SelectFieldData, Decl(correlatedUnions.ts, 22, 38))
}

type FormField<K extends keyof FieldMap> = { type: K, data: FieldMap[K] };
>FormField : Symbol(FormField, Decl(correlatedUnions.ts, 28, 1))
>K : Symbol(K, Decl(correlatedUnions.ts, 30, 15))
>FieldMap : Symbol(FieldMap, Decl(correlatedUnions.ts, 23, 67))
>type : Symbol(type, Decl(correlatedUnions.ts, 30, 44))
>type : Symbol(FormField.type, Decl(correlatedUnions.ts, 30, 44))
>K : Symbol(K, Decl(correlatedUnions.ts, 30, 15))
>data : Symbol(data, Decl(correlatedUnions.ts, 30, 53))
>data : Symbol(FormField.data, Decl(correlatedUnions.ts, 30, 53))
>FieldMap : Symbol(FieldMap, Decl(correlatedUnions.ts, 23, 67))
>K : Symbol(K, Decl(correlatedUnions.ts, 30, 15))

@@ -159,15 +159,15 @@ function renderField<K extends keyof FieldMap>(field: FormField<K>) {
const renderFn = renderFuncs[field.type];
>renderFn : Symbol(renderFn, Decl(correlatedUnions.ts, 44, 9))
>renderFuncs : Symbol(renderFuncs, Decl(correlatedUnions.ts, 38, 5))
>field.type : Symbol(type, Decl(correlatedUnions.ts, 30, 44))
>field.type : Symbol(FormField.type, Decl(correlatedUnions.ts, 30, 44))
>field : Symbol(field, Decl(correlatedUnions.ts, 43, 47))
>type : Symbol(type, Decl(correlatedUnions.ts, 30, 44))
>type : Symbol(FormField.type, Decl(correlatedUnions.ts, 30, 44))

renderFn(field.data);
>renderFn : Symbol(renderFn, Decl(correlatedUnions.ts, 44, 9))
>field.data : Symbol(data, Decl(correlatedUnions.ts, 30, 53))
>field.data : Symbol(FormField.data, Decl(correlatedUnions.ts, 30, 53))
>field : Symbol(field, Decl(correlatedUnions.ts, 43, 47))
>data : Symbol(data, Decl(correlatedUnions.ts, 30, 53))
>data : Symbol(FormField.data, Decl(correlatedUnions.ts, 30, 53))
}

// --------
@@ -176,10 +176,10 @@ type TypeMap = {
>TypeMap : Symbol(TypeMap, Decl(correlatedUnions.ts, 46, 1))

foo: string,
>foo : Symbol(foo, Decl(correlatedUnions.ts, 50, 16))
>foo : Symbol(TypeMap.foo, Decl(correlatedUnions.ts, 50, 16))

bar: number
>bar : Symbol(bar, Decl(correlatedUnions.ts, 51, 16))
>bar : Symbol(TypeMap.bar, Decl(correlatedUnions.ts, 51, 16))

};

@@ -298,8 +298,8 @@ process([{ type: 'foo', data: 'abc' }]);

type LetterMap = { A: string, B: number }
>LetterMap : Symbol(LetterMap, Decl(correlatedUnions.ts, 84, 40))
>A : Symbol(A, Decl(correlatedUnions.ts, 88, 18))
>B : Symbol(B, Decl(correlatedUnions.ts, 88, 29))
>A : Symbol(LetterMap.A, Decl(correlatedUnions.ts, 88, 18))
>B : Symbol(LetterMap.B, Decl(correlatedUnions.ts, 88, 29))

type LetterCaller<K extends keyof LetterMap> = { [P in K]: { letter: Record<P, LetterMap[P]>, caller: (x: Record<P, LetterMap[P]>) => void } }[K];
>LetterCaller : Symbol(LetterCaller, Decl(correlatedUnions.ts, 88, 41))
@@ -336,11 +336,11 @@ function call<K extends keyof LetterMap>({ letter, caller }: LetterCaller<K>): v

type A = { A: string };
>A : Symbol(A, Decl(correlatedUnions.ts, 93, 1))
>A : Symbol(A, Decl(correlatedUnions.ts, 95, 10))
>A : Symbol(A.A, Decl(correlatedUnions.ts, 95, 10))

type B = { B: number };
>B : Symbol(B, Decl(correlatedUnions.ts, 95, 23))
>B : Symbol(B, Decl(correlatedUnions.ts, 96, 10))
>B : Symbol(B.B, Decl(correlatedUnions.ts, 96, 10))

type ACaller = (a: A) => void;
>ACaller : Symbol(ACaller, Decl(correlatedUnions.ts, 96, 23))
@@ -512,10 +512,10 @@ function ff1() {
>ArgMap : Symbol(ArgMap, Decl(correlatedUnions.ts, 141, 16))

sum: [a: number, b: number],
>sum : Symbol(sum, Decl(correlatedUnions.ts, 142, 19))
>sum : Symbol(ArgMap.sum, Decl(correlatedUnions.ts, 142, 19))

concat: [a: string, b: string, c: string]
>concat : Symbol(concat, Decl(correlatedUnions.ts, 143, 36))
>concat : Symbol(ArgMap.concat, Decl(correlatedUnions.ts, 143, 36))
}
type Keys = keyof ArgMap;
>Keys : Symbol(Keys, Decl(correlatedUnions.ts, 145, 5))
@@ -577,8 +577,8 @@ function ff1() {

type ArgMap = { a: number, b: string };
>ArgMap : Symbol(ArgMap, Decl(correlatedUnions.ts, 157, 1))
>a : Symbol(a, Decl(correlatedUnions.ts, 161, 15))
>b : Symbol(b, Decl(correlatedUnions.ts, 161, 26))
>a : Symbol(ArgMap.a, Decl(correlatedUnions.ts, 161, 15))
>b : Symbol(ArgMap.b, Decl(correlatedUnions.ts, 161, 26))

type Func<K extends keyof ArgMap> = (x: ArgMap[K]) => void;
>Func : Symbol(Func, Decl(correlatedUnions.ts, 161, 39))
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ module M {
export type MC = m.c;
>MC : Symbol(MC, Decl(declFileTypeAnnotationTypeAlias.ts, 12, 5))
>m : Symbol(m, Decl(declFileTypeAnnotationTypeAlias.ts, 7, 22))
>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 21))
>c : Symbol(MC, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 21))

export type fc = () => c;
>fc : Symbol(fc, Decl(declFileTypeAnnotationTypeAlias.ts, 14, 25))
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ module M {
}

export type MC = m.c;
>MC : m.c
>MC : MC
>m : any

export type fc = () => c;
Original file line number Diff line number Diff line change
@@ -80,11 +80,11 @@ module M2 {
type t111 = m3.public1;
>t111 : Symbol(t111, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 34, 30))
>m3 : Symbol(m3, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 24, 5))
>public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
>public1 : Symbol(t111, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))

export type t112 = m3.public1; // error
>t112 : Symbol(t112, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 36, 27))
>m3 : Symbol(m3, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 24, 5))
>public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
>public1 : Symbol(t111, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
}

Original file line number Diff line number Diff line change
@@ -68,11 +68,11 @@ module M2 {
>t12 : public1

type t111 = m3.public1;
>t111 : m3.public1
>t111 : t111
>m3 : any

export type t112 = m3.public1; // error
>t112 : m3.public1
>t112 : t111
>m3 : any
}

Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ export type Locale = {
>Locale : Symbol(Locale, Decl(locale.d.ts, 0, 0))

weekdays: {
>weekdays : Symbol(weekdays, Decl(locale.d.ts, 0, 22))
>weekdays : Symbol(Locale.weekdays, Decl(locale.d.ts, 0, 22))

shorthand: [string, string, string, string, string, string, string];
>shorthand : Symbol(shorthand, Decl(locale.d.ts, 1, 15))
@@ -17,7 +17,7 @@ export type CustomLocale = {
>CustomLocale : Symbol(CustomLocale, Decl(locale.d.ts, 5, 2))

weekdays: {
>weekdays : Symbol(weekdays, Decl(locale.d.ts, 6, 28))
>weekdays : Symbol(CustomLocale.weekdays, Decl(locale.d.ts, 6, 28))

shorthand: [string, string, string, string, string, string, string];
>shorthand : Symbol(shorthand, Decl(locale.d.ts, 7, 15))
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ class C2 {

type ObjType1 = { x: number; y: string; z: boolean }
>ObjType1 : Symbol(ObjType1, Decl(declarationEmitDestructuringParameterProperties.ts, 9, 1))
>x : Symbol(x, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 17))
>y : Symbol(y, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 28))
>z : Symbol(z, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 39))
>x : Symbol(ObjType1.x, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 17))
>y : Symbol(ObjType1.y, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 28))
>z : Symbol(ObjType1.z, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 39))

class C3 {
>C3 : Symbol(C3, Decl(declarationEmitDestructuringParameterProperties.ts, 11, 52))
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ declare namespace React {
>T : Symbol(T, Decl(index.d.ts, 3, 26))
>U : Symbol(U, Decl(index.d.ts, 3, 34))
>V : Symbol(V, Decl(index.d.ts, 3, 42))
>x : Symbol(x, Decl(index.d.ts, 3, 54))
>x : Symbol(Component.x, Decl(index.d.ts, 3, 54))
>T : Symbol(T, Decl(index.d.ts, 3, 26))
>y : Symbol(y, Decl(index.d.ts, 3, 60))
>y : Symbol(Component.y, Decl(index.d.ts, 3, 60))
>U : Symbol(U, Decl(index.d.ts, 3, 34))
>z : Symbol(z, Decl(index.d.ts, 3, 66))
>z : Symbol(Component.z, Decl(index.d.ts, 3, 66))
>V : Symbol(V, Decl(index.d.ts, 3, 42))

export interface DOMAttributes<T> { }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== tests/cases/compiler/a.ts ===
type AX = { readonly A: unique symbol };
>AX : Symbol(AX, Decl(a.ts, 0, 0))
>A : Symbol(A, Decl(a.ts, 0, 11))
>A : Symbol(AX.A, Decl(a.ts, 0, 11))

export const A: AX = 0 as any;
>A : Symbol(A, Decl(a.ts, 1, 12))
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ declare module "@ts-bug/a" {
>AText : Symbol(AText, Decl(index.d.ts, 0, 28))

value: string;
>value : Symbol(value, Decl(index.d.ts, 1, 25))
>value : Symbol(AText.value, Decl(index.d.ts, 1, 25))

};
export function a(text: string): AText;
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ export declare type A = {
>A : Symbol(A, Decl(types.d.ts, 0, 0))

id: string;
>id : Symbol(id, Decl(types.d.ts, 0, 25))
>id : Symbol(A.id, Decl(types.d.ts, 0, 25))

};
export declare type B = {
>B : Symbol(B, Decl(types.d.ts, 2, 2))

id: number;
>id : Symbol(id, Decl(types.d.ts, 3, 25))
>id : Symbol(B.id, Decl(types.d.ts, 3, 25))

};
export declare type IdType = A | B;
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ export declare type A = {
>A : Symbol(A, Decl(types.d.ts, 0, 0))

id: string;
>id : Symbol(id, Decl(types.d.ts, 0, 25))
>id : Symbol(A.id, Decl(types.d.ts, 0, 25))

};
export declare type B = {
>B : Symbol(B, Decl(types.d.ts, 2, 2))

id: number;
>id : Symbol(id, Decl(types.d.ts, 3, 25))
>id : Symbol(B.id, Decl(types.d.ts, 3, 25))

};
export declare type IdType = A | B;
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ export declare type A = {
>A : Symbol(A, Decl(types.d.ts, 0, 0))

id: string;
>id : Symbol(id, Decl(types.d.ts, 0, 25))
>id : Symbol(A.id, Decl(types.d.ts, 0, 25))

};
export declare type B = {
>B : Symbol(B, Decl(types.d.ts, 2, 2))

id: number;
>id : Symbol(id, Decl(types.d.ts, 3, 25))
>id : Symbol(B.id, Decl(types.d.ts, 3, 25))

};
export declare type IdType = A | B;
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ type Foo<T> = {
>T : Symbol(T, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 0, 9))

foo<U>(): Foo<U>
>foo : Symbol(foo, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 0, 15))
>foo : Symbol(Foo.foo, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 0, 15))
>U : Symbol(U, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 1, 8))
>Foo : Symbol(Foo, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 0, 0))
>U : Symbol(U, Decl(declarationEmitTypeAliasWithTypeParameters3.ts, 1, 8))
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ type Foo<T, Y> = {
>Y : Symbol(Y, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 0, 11))

foo<U, J>(): Foo<U, J>
>foo : Symbol(foo, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 0, 18))
>foo : Symbol(Foo.foo, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 0, 18))
>U : Symbol(U, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 1, 8))
>J : Symbol(J, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 1, 10))
>Foo : Symbol(Foo, Decl(declarationEmitTypeAliasWithTypeParameters4.ts, 0, 0))
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ type Foo<T, Y> = {
>Y : Symbol(Y, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 0, 11))

foo<U, J>(): Foo<U, J>
>foo : Symbol(foo, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 0, 18))
>foo : Symbol(Foo.foo, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 0, 18))
>U : Symbol(U, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 1, 8))
>J : Symbol(J, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 1, 10))
>Foo : Symbol(Foo, Decl(declarationEmitTypeAliasWithTypeParameters5.ts, 0, 0))
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ type Foo<T, Y> = {
>Y : Symbol(Y, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 0, 11))

foo<U, J>(): Foo<U, J>
>foo : Symbol(foo, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 0, 18))
>foo : Symbol(Foo.foo, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 0, 18))
>U : Symbol(U, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 1, 8))
>J : Symbol(J, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 1, 10))
>Foo : Symbol(Foo, Decl(declarationEmitTypeAliasWithTypeParameters6.ts, 0, 0))
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ type Experiment<Name> = {
>Name : Symbol(Name, Decl(other.ts, 0, 16))

name: Name;
>name : Symbol(name, Decl(other.ts, 0, 25))
>name : Symbol(Experiment.name, Decl(other.ts, 0, 25))
>Name : Symbol(Name, Decl(other.ts, 0, 16))

};
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ type Experiment<Name> = {
>Name : Symbol(Name, Decl(other.ts, 0, 16))

name: Name;
>name : Symbol(name, Decl(other.ts, 0, 25))
>name : Symbol(Experiment.name, Decl(other.ts, 0, 25))
>Name : Symbol(Name, Decl(other.ts, 0, 16))

};
Original file line number Diff line number Diff line change
@@ -52,7 +52,9 @@ declare class Conn {
}
export = Conn;
//// [usage.d.ts]
declare type Conn = import("./foo");
export declare class Wrap {
connItem: number;
constructor(c?: import("./foo"));
constructor(c?: Conn);
}
export {};
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ export = Conn;

=== tests/cases/compiler/usage.ts ===
type Conn = import("./foo");
>Conn : import("tests/cases/compiler/foo")
>Conn : Conn

declare var x: Conn;
>x : import("tests/cases/compiler/foo")
>x : Conn

export class Wrap {
>Wrap : Wrap
@@ -28,16 +28,16 @@ export class Wrap {
>connItem : number

constructor(c = x) {
>c : import("tests/cases/compiler/foo")
>x : import("tests/cases/compiler/foo")
>c : Conn
>x : Conn

this.connItem = c.item;
>this.connItem = c.item : number
>this.connItem : number
>this : this
>connItem : number
>c.item : number
>c : import("tests/cases/compiler/foo")
>c : Conn
>item : number
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== tests/cases/compiler/dom.ts ===
export type DOMNode = Node;
>DOMNode : Symbol(DOMNode, Decl(dom.ts, 0, 0))
>Node : Symbol(Node, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
>Node : Symbol(DOMNode, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))

=== tests/cases/compiler/custom.ts ===
export type Node = {};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/dom.ts ===
export type DOMNode = Node;
>DOMNode : Node
>DOMNode : DOMNode

=== tests/cases/compiler/custom.ts ===
export type Node = {};
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ export interface Ctor {
export type ExtendedCtor<T> = {x: number, ext: T};
>ExtendedCtor : Symbol(ExtendedCtor, Decl(ctor.d.ts, 2, 1))
>T : Symbol(T, Decl(ctor.d.ts, 3, 25))
>x : Symbol(x, Decl(ctor.d.ts, 3, 31))
>ext : Symbol(ext, Decl(ctor.d.ts, 3, 41))
>x : Symbol(ExtendedCtor.x, Decl(ctor.d.ts, 3, 31))
>ext : Symbol(ExtendedCtor.ext, Decl(ctor.d.ts, 3, 41))
>T : Symbol(T, Decl(ctor.d.ts, 3, 25))

export interface CtorConstructor {
8 changes: 4 additions & 4 deletions tests/baselines/reference/deepComparisons.symbols
Original file line number Diff line number Diff line change
@@ -36,14 +36,14 @@ function f1<T, K1 extends keyof T, K2 extends keyof T[K1]>() {
type Foo<T> = { x: Foo<T> };
>Foo : Symbol(Foo, Decl(deepComparisons.ts, 4, 1))
>T : Symbol(T, Decl(deepComparisons.ts, 6, 9))
>x : Symbol(x, Decl(deepComparisons.ts, 6, 15))
>x : Symbol(Foo.x, Decl(deepComparisons.ts, 6, 15))
>Foo : Symbol(Foo, Decl(deepComparisons.ts, 4, 1))
>T : Symbol(T, Decl(deepComparisons.ts, 6, 9))

type Bar<T> = { x: Bar<T[]> };
>Bar : Symbol(Bar, Decl(deepComparisons.ts, 6, 28))
>T : Symbol(T, Decl(deepComparisons.ts, 7, 9))
>x : Symbol(x, Decl(deepComparisons.ts, 7, 15))
>x : Symbol(Bar.x, Decl(deepComparisons.ts, 7, 15))
>Bar : Symbol(Bar, Decl(deepComparisons.ts, 6, 28))
>T : Symbol(T, Decl(deepComparisons.ts, 7, 9))

@@ -62,14 +62,14 @@ function f2<U>() {
type Foo1<T> = { x: Foo2<T> };
>Foo1 : Symbol(Foo1, Decl(deepComparisons.ts, 11, 1))
>T : Symbol(T, Decl(deepComparisons.ts, 13, 10))
>x : Symbol(x, Decl(deepComparisons.ts, 13, 16))
>x : Symbol(Foo1.x, Decl(deepComparisons.ts, 13, 16))
>Foo2 : Symbol(Foo2, Decl(deepComparisons.ts, 13, 30))
>T : Symbol(T, Decl(deepComparisons.ts, 13, 10))

type Foo2<T> = { x: Foo1<T> };
>Foo2 : Symbol(Foo2, Decl(deepComparisons.ts, 13, 30))
>T : Symbol(T, Decl(deepComparisons.ts, 14, 10))
>x : Symbol(x, Decl(deepComparisons.ts, 14, 16))
>x : Symbol(Foo2.x, Decl(deepComparisons.ts, 14, 16))
>Foo1 : Symbol(Foo1, Decl(deepComparisons.ts, 11, 1))
>T : Symbol(T, Decl(deepComparisons.ts, 14, 10))

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts ===
function f(addUndefined1 = "J", addUndefined2?: number) {
>f : (addUndefined1?: string, addUndefined2?: number | undefined) => number
>f : (addUndefined1?: string, addUndefined2?: number) => number
>addUndefined1 : string
>"J" : "J"
>addUndefined2 : number | undefined
Original file line number Diff line number Diff line change
@@ -601,7 +601,7 @@ type FooMethod = {
>FooMethod : Symbol(FooMethod, Decl(dependentDestructuredVariables.ts, 225, 59))

method(...args:
>method : Symbol(method, Decl(dependentDestructuredVariables.ts, 229, 18))
>method : Symbol(FooMethod.method, Decl(dependentDestructuredVariables.ts, 229, 18))
>args : Symbol(args, Decl(dependentDestructuredVariables.ts, 230, 9))

[type: "str", cb: (e: string) => void] |
@@ -639,7 +639,7 @@ type FooAsyncMethod = {
>FooAsyncMethod : Symbol(FooAsyncMethod, Decl(dependentDestructuredVariables.ts, 244, 2))

method(...args:
>method : Symbol(method, Decl(dependentDestructuredVariables.ts, 246, 23))
>method : Symbol(FooAsyncMethod.method, Decl(dependentDestructuredVariables.ts, 246, 23))
>args : Symbol(args, Decl(dependentDestructuredVariables.ts, 247, 9))

[type: "str", cb: (e: string) => void] |
@@ -678,7 +678,7 @@ type FooGenMethod = {
>FooGenMethod : Symbol(FooGenMethod, Decl(dependentDestructuredVariables.ts, 261, 2))

method(...args:
>method : Symbol(method, Decl(dependentDestructuredVariables.ts, 263, 21))
>method : Symbol(FooGenMethod.method, Decl(dependentDestructuredVariables.ts, 263, 21))
>args : Symbol(args, Decl(dependentDestructuredVariables.ts, 264, 9))

[type: "str", cb: (e: string) => void] |
@@ -717,7 +717,7 @@ type FooAsyncGenMethod = {
>FooAsyncGenMethod : Symbol(FooAsyncGenMethod, Decl(dependentDestructuredVariables.ts, 278, 2))

method(...args:
>method : Symbol(method, Decl(dependentDestructuredVariables.ts, 280, 26))
>method : Symbol(FooAsyncGenMethod.method, Decl(dependentDestructuredVariables.ts, 280, 26))
>args : Symbol(args, Decl(dependentDestructuredVariables.ts, 281, 9))

[type: "str", cb: (e: string) => void] |
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/destructureOptionalParameter.ts ===
declare function f1({ a, b }?: { a: number, b: string }): void;
>f1 : ({ a, b }?: { a: number; b: string; } | undefined) => void
>f1 : ({ a, b }?: { a: number; b: string;}) => void
>a : number
>b : string
>a : number
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ function f1(options?: { color?: string, width?: number }) {
}

function f2(options?: [string?, number?]) {
>f2 : (options?: [(string | undefined)?, (number | undefined)?] | undefined) => void
>f2 : (options?: [string?, number?]) => void
>options : [(string | undefined)?, (number | undefined)?] | undefined

let [str, num] = options || [];
@@ -133,7 +133,7 @@ function f3(options?: { color: string, width: number }) {
}

function f4(options?: [string, number]) {
>f4 : (options?: [string, number] | undefined) => void
>f4 : (options?: [string, number]) => void
>options : [string, number] | undefined

let [str, num] = options || [];
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ type F1 = ([a, b, c]) => void;

type T2 = ({ a });
>T2 : Symbol(T2, Decl(destructuringInFunctionType.ts, 5, 30))
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 7, 12))
>a : Symbol(T2.a, Decl(destructuringInFunctionType.ts, 7, 12))

type F2 = ({ a }) => void;
>F2 : Symbol(F2, Decl(destructuringInFunctionType.ts, 7, 18))
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ class C2 {

type ObjType1 = { x: number; y: string; z: boolean }
>ObjType1 : Symbol(ObjType1, Decl(destructuringParameterProperties1.ts, 10, 1))
>x : Symbol(x, Decl(destructuringParameterProperties1.ts, 12, 17))
>y : Symbol(y, Decl(destructuringParameterProperties1.ts, 12, 28))
>z : Symbol(z, Decl(destructuringParameterProperties1.ts, 12, 39))
>x : Symbol(ObjType1.x, Decl(destructuringParameterProperties1.ts, 12, 17))
>y : Symbol(ObjType1.y, Decl(destructuringParameterProperties1.ts, 12, 28))
>z : Symbol(ObjType1.z, Decl(destructuringParameterProperties1.ts, 12, 39))

class C3 {
>C3 : Symbol(C3, Decl(destructuringParameterProperties1.ts, 12, 52))
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts ===
type ObjType1 = { x: number; y: string; z: boolean }
>ObjType1 : Symbol(ObjType1, Decl(destructuringParameterProperties5.ts, 0, 0))
>x : Symbol(x, Decl(destructuringParameterProperties5.ts, 0, 17))
>y : Symbol(y, Decl(destructuringParameterProperties5.ts, 0, 28))
>z : Symbol(z, Decl(destructuringParameterProperties5.ts, 0, 39))
>x : Symbol(ObjType1.x, Decl(destructuringParameterProperties5.ts, 0, 17))
>y : Symbol(ObjType1.y, Decl(destructuringParameterProperties5.ts, 0, 28))
>z : Symbol(ObjType1.z, Decl(destructuringParameterProperties5.ts, 0, 39))

type TupleType1 = [ObjType1, number, string]
>TupleType1 : Symbol(TupleType1, Decl(destructuringParameterProperties5.ts, 0, 52))
38 changes: 19 additions & 19 deletions tests/baselines/reference/destructuringTypeGuardFlow.symbols
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@ type foo = {
>foo : Symbol(foo, Decl(destructuringTypeGuardFlow.ts, 0, 0))

bar: number | null;
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))

baz: string;
>baz : Symbol(baz, Decl(destructuringTypeGuardFlow.ts, 1, 21))
>baz : Symbol(foo.baz, Decl(destructuringTypeGuardFlow.ts, 1, 21))

nested: {
>nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))

a: number;
>a : Symbol(a, Decl(destructuringTypeGuardFlow.ts, 3, 11))
@@ -29,29 +29,29 @@ const aFoo: foo = { bar: 3, baz: "b", nested: { a: 1, b: "y" } };
>b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 9, 53))

if (aFoo.bar && aFoo.nested.b) {
>aFoo.bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>aFoo.bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>aFoo : Symbol(aFoo, Decl(destructuringTypeGuardFlow.ts, 9, 5))
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>aFoo.nested.b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))
>aFoo.nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>aFoo.nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>aFoo : Symbol(aFoo, Decl(destructuringTypeGuardFlow.ts, 9, 5))
>nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))

const { bar, baz, nested: {a, b: text} } = aFoo;
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 12, 9))
>baz : Symbol(baz, Decl(destructuringTypeGuardFlow.ts, 12, 14))
>nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>a : Symbol(a, Decl(destructuringTypeGuardFlow.ts, 12, 29))
>b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))
>text : Symbol(text, Decl(destructuringTypeGuardFlow.ts, 12, 31))
>aFoo : Symbol(aFoo, Decl(destructuringTypeGuardFlow.ts, 9, 5))

const right: number = aFoo.bar;
>right : Symbol(right, Decl(destructuringTypeGuardFlow.ts, 13, 7))
>aFoo.bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>aFoo.bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>aFoo : Symbol(aFoo, Decl(destructuringTypeGuardFlow.ts, 9, 5))
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))

const wrong: number = bar;
>wrong : Symbol(wrong, Decl(destructuringTypeGuardFlow.ts, 14, 7))
@@ -74,10 +74,10 @@ type bar = {
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 18, 1))

elem1: number | null;
>elem1 : Symbol(elem1, Decl(destructuringTypeGuardFlow.ts, 20, 12))
>elem1 : Symbol(bar.elem1, Decl(destructuringTypeGuardFlow.ts, 20, 12))

elem2: foo | null;
>elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 21, 23))
>elem2 : Symbol(bar.elem2, Decl(destructuringTypeGuardFlow.ts, 21, 23))
>foo : Symbol(foo, Decl(destructuringTypeGuardFlow.ts, 0, 0))

};
@@ -92,23 +92,23 @@ if (bBar.elem2 && bBar.elem2.bar && bBar.elem2.nested.b) {
>bBar.elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bBar : Symbol(bBar, Decl(destructuringTypeGuardFlow.ts, 25, 5))
>elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bBar.elem2.bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bBar.elem2.bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bBar.elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bBar : Symbol(bBar, Decl(destructuringTypeGuardFlow.ts, 25, 5))
>elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bBar.elem2.nested.b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))
>bBar.elem2.nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>bBar.elem2.nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>bBar.elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bBar : Symbol(bBar, Decl(destructuringTypeGuardFlow.ts, 25, 5))
>elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))

const { bar, baz, nested: {a, b: text} } = bBar.elem2;
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 28, 9))
>baz : Symbol(baz, Decl(destructuringTypeGuardFlow.ts, 28, 14))
>nested : Symbol(nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>nested : Symbol(foo.nested, Decl(destructuringTypeGuardFlow.ts, 2, 14))
>a : Symbol(a, Decl(destructuringTypeGuardFlow.ts, 28, 29))
>b : Symbol(b, Decl(destructuringTypeGuardFlow.ts, 4, 14))
>text : Symbol(text, Decl(destructuringTypeGuardFlow.ts, 28, 31))
@@ -118,11 +118,11 @@ if (bBar.elem2 && bBar.elem2.bar && bBar.elem2.nested.b) {

const right: number = bBar.elem2.bar;
>right : Symbol(right, Decl(destructuringTypeGuardFlow.ts, 29, 7))
>bBar.elem2.bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bBar.elem2.bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bBar.elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bBar : Symbol(bBar, Decl(destructuringTypeGuardFlow.ts, 25, 5))
>elem2 : Symbol(elem2, Decl(destructuringTypeGuardFlow.ts, 25, 24))
>bar : Symbol(bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))
>bar : Symbol(foo.bar, Decl(destructuringTypeGuardFlow.ts, 0, 12))

const wrong: number = bar;
>wrong : Symbol(wrong, Decl(destructuringTypeGuardFlow.ts, 30, 7))
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ type T13 = typeof zz

var zz: { x: T11 }
>zz : Symbol(zz, Decl(directDependenceBetweenTypeAliases.ts, 39, 3))
>x : Symbol(x, Decl(directDependenceBetweenTypeAliases.ts, 39, 9))
>x : Symbol(T13.x, Decl(directDependenceBetweenTypeAliases.ts, 39, 9))
>T11 : Symbol(T11, Decl(directDependenceBetweenTypeAliases.ts, 35, 47))


20 changes: 10 additions & 10 deletions tests/baselines/reference/discriminantPropertyCheck.symbols
Original file line number Diff line number Diff line change
@@ -459,13 +459,13 @@ type UnionOfBar = TypeBar1 | TypeBar2;

type TypeBar1 = { type: BarEnum.bar1 };
>TypeBar1 : Symbol(TypeBar1, Decl(discriminantPropertyCheck.ts, 159, 38))
>type : Symbol(type, Decl(discriminantPropertyCheck.ts, 160, 17))
>type : Symbol(TypeBar1.type, Decl(discriminantPropertyCheck.ts, 160, 17))
>BarEnum : Symbol(BarEnum, Decl(discriminantPropertyCheck.ts, 152, 44))
>bar1 : Symbol(BarEnum.bar1, Decl(discriminantPropertyCheck.ts, 154, 20))

type TypeBar2 = { type: BarEnum.bar2 };
>TypeBar2 : Symbol(TypeBar2, Decl(discriminantPropertyCheck.ts, 160, 39))
>type : Symbol(type, Decl(discriminantPropertyCheck.ts, 161, 17))
>type : Symbol(TypeBar2.type, Decl(discriminantPropertyCheck.ts, 161, 17))
>BarEnum : Symbol(BarEnum, Decl(discriminantPropertyCheck.ts, 152, 44))
>bar2 : Symbol(BarEnum.bar2, Decl(discriminantPropertyCheck.ts, 155, 13))

@@ -587,20 +587,20 @@ type TestA = {
>TestA : Symbol(TestA, Decl(discriminantPropertyCheck.ts, 204, 1))

type: 'testA';
>type : Symbol(type, Decl(discriminantPropertyCheck.ts, 208, 14))
>type : Symbol(TestA.type, Decl(discriminantPropertyCheck.ts, 208, 14))

bananas: 3;
>bananas : Symbol(bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>bananas : Symbol(TestA.bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
}

type TestB = {
>TestB : Symbol(TestB, Decl(discriminantPropertyCheck.ts, 211, 1))

type: 'testB';
>type : Symbol(type, Decl(discriminantPropertyCheck.ts, 213, 14))
>type : Symbol(TestB.type, Decl(discriminantPropertyCheck.ts, 213, 14))

apples: 5;
>apples : Symbol(apples, Decl(discriminantPropertyCheck.ts, 214, 18))
>apples : Symbol(TestB.apples, Decl(discriminantPropertyCheck.ts, 214, 18))
}

type AllTests = TestA | TestB;
@@ -642,9 +642,9 @@ const doTestingStuff = (mapOfTests: MapOfAllTests, ids: string[]) => {
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>test.bananas : Symbol(bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>test.bananas : Symbol(TestA.bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>test : Symbol(test, Decl(discriminantPropertyCheck.ts, 224, 11))
>bananas : Symbol(bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>bananas : Symbol(TestA.bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
}
switch (test.type) {
>test.type : Symbol(type, Decl(discriminantPropertyCheck.ts, 208, 14), Decl(discriminantPropertyCheck.ts, 213, 14))
@@ -656,9 +656,9 @@ const doTestingStuff = (mapOfTests: MapOfAllTests, ids: string[]) => {
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>test.bananas : Symbol(bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>test.bananas : Symbol(TestA.bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>test : Symbol(test, Decl(discriminantPropertyCheck.ts, 224, 11))
>bananas : Symbol(bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
>bananas : Symbol(TestA.bananas, Decl(discriminantPropertyCheck.ts, 209, 18))
}
}
});
Original file line number Diff line number Diff line change
@@ -5,21 +5,21 @@ type DiscriminatorTrue = {
>DiscriminatorTrue : Symbol(DiscriminatorTrue, Decl(discriminantPropertyInference.ts, 0, 0))

disc: true;
>disc : Symbol(disc, Decl(discriminantPropertyInference.ts, 2, 26))
>disc : Symbol(DiscriminatorTrue.disc, Decl(discriminantPropertyInference.ts, 2, 26))

cb: (x: string) => void;
>cb : Symbol(cb, Decl(discriminantPropertyInference.ts, 3, 15))
>cb : Symbol(DiscriminatorTrue.cb, Decl(discriminantPropertyInference.ts, 3, 15))
>x : Symbol(x, Decl(discriminantPropertyInference.ts, 4, 9))
}

type DiscriminatorFalse = {
>DiscriminatorFalse : Symbol(DiscriminatorFalse, Decl(discriminantPropertyInference.ts, 5, 1))

disc?: false;
>disc : Symbol(disc, Decl(discriminantPropertyInference.ts, 7, 27))
>disc : Symbol(DiscriminatorFalse.disc, Decl(discriminantPropertyInference.ts, 7, 27))

cb: (x: number) => void;
>cb : Symbol(cb, Decl(discriminantPropertyInference.ts, 8, 17))
>cb : Symbol(DiscriminatorFalse.cb, Decl(discriminantPropertyInference.ts, 8, 17))
>x : Symbol(x, Decl(discriminantPropertyInference.ts, 9, 9))
}

14 changes: 7 additions & 7 deletions tests/baselines/reference/discriminatedUnionErrorMessage.symbols
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
=== tests/cases/compiler/discriminatedUnionErrorMessage.ts ===
type Square = { kind: "sq", size: number }
>Square : Symbol(Square, Decl(discriminatedUnionErrorMessage.ts, 0, 0))
>kind : Symbol(kind, Decl(discriminatedUnionErrorMessage.ts, 0, 15))
>size : Symbol(size, Decl(discriminatedUnionErrorMessage.ts, 0, 27))
>kind : Symbol(Square.kind, Decl(discriminatedUnionErrorMessage.ts, 0, 15))
>size : Symbol(Square.size, Decl(discriminatedUnionErrorMessage.ts, 0, 27))

type Rectangle = { kind: "rt", x: number, y: number }
>Rectangle : Symbol(Rectangle, Decl(discriminatedUnionErrorMessage.ts, 0, 42))
>kind : Symbol(kind, Decl(discriminatedUnionErrorMessage.ts, 1, 18))
>x : Symbol(x, Decl(discriminatedUnionErrorMessage.ts, 1, 30))
>y : Symbol(y, Decl(discriminatedUnionErrorMessage.ts, 1, 41))
>kind : Symbol(Rectangle.kind, Decl(discriminatedUnionErrorMessage.ts, 1, 18))
>x : Symbol(Rectangle.x, Decl(discriminatedUnionErrorMessage.ts, 1, 30))
>y : Symbol(Rectangle.y, Decl(discriminatedUnionErrorMessage.ts, 1, 41))

type Circle = { kind: "cr", radius: number }
>Circle : Symbol(Circle, Decl(discriminatedUnionErrorMessage.ts, 1, 53))
>kind : Symbol(kind, Decl(discriminatedUnionErrorMessage.ts, 2, 15))
>radius : Symbol(radius, Decl(discriminatedUnionErrorMessage.ts, 2, 27))
>kind : Symbol(Circle.kind, Decl(discriminatedUnionErrorMessage.ts, 2, 15))
>radius : Symbol(Circle.radius, Decl(discriminatedUnionErrorMessage.ts, 2, 27))

type Shape =
>Shape : Symbol(Shape, Decl(discriminatedUnionErrorMessage.ts, 2, 44))
4 changes: 2 additions & 2 deletions tests/baselines/reference/discriminatedUnionInference.symbols
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
type Foo<A> = { type: "foo", (): A[] };
>Foo : Symbol(Foo, Decl(discriminatedUnionInference.ts, 0, 0))
>A : Symbol(A, Decl(discriminatedUnionInference.ts, 2, 9))
>type : Symbol(type, Decl(discriminatedUnionInference.ts, 2, 15))
>type : Symbol(Foo.type, Decl(discriminatedUnionInference.ts, 2, 15))
>A : Symbol(A, Decl(discriminatedUnionInference.ts, 2, 9))

type Bar<A> = { type: "bar", (): A };
>Bar : Symbol(Bar, Decl(discriminatedUnionInference.ts, 2, 39))
>A : Symbol(A, Decl(discriminatedUnionInference.ts, 3, 9))
>type : Symbol(type, Decl(discriminatedUnionInference.ts, 3, 15))
>type : Symbol(Bar.type, Decl(discriminatedUnionInference.ts, 3, 15))
>A : Symbol(A, Decl(discriminatedUnionInference.ts, 3, 9))

type FooBar<A> = Foo<A> | Bar<A>;
20 changes: 10 additions & 10 deletions tests/baselines/reference/discriminatedUnionTypes2.symbols
Original file line number Diff line number Diff line change
@@ -279,28 +279,28 @@ type a = {
>a : Symbol(a, Decl(discriminatedUnionTypes2.ts, 93, 1))

type: 'a',
>type : Symbol(type, Decl(discriminatedUnionTypes2.ts, 97, 10))
>type : Symbol(a.type, Decl(discriminatedUnionTypes2.ts, 97, 10))

data: string
>data : Symbol(data, Decl(discriminatedUnionTypes2.ts, 98, 14))
>data : Symbol(a.data, Decl(discriminatedUnionTypes2.ts, 98, 14))
}
type b = {
>b : Symbol(b, Decl(discriminatedUnionTypes2.ts, 100, 1))

type: 'b',
>type : Symbol(type, Decl(discriminatedUnionTypes2.ts, 101, 10))
>type : Symbol(b.type, Decl(discriminatedUnionTypes2.ts, 101, 10))

name: string
>name : Symbol(name, Decl(discriminatedUnionTypes2.ts, 102, 14))
>name : Symbol(b.name, Decl(discriminatedUnionTypes2.ts, 102, 14))
}
type c = {
>c : Symbol(c, Decl(discriminatedUnionTypes2.ts, 104, 1))

type: 'c',
>type : Symbol(type, Decl(discriminatedUnionTypes2.ts, 105, 10))
>type : Symbol(c.type, Decl(discriminatedUnionTypes2.ts, 105, 10))

other: string
>other : Symbol(other, Decl(discriminatedUnionTypes2.ts, 106, 14))
>other : Symbol(c.other, Decl(discriminatedUnionTypes2.ts, 106, 14))
}

type abc = a | b | c;
@@ -322,15 +322,15 @@ function f(problem: abc & (b | c)) {
>type : Symbol(type, Decl(discriminatedUnionTypes2.ts, 101, 10), Decl(discriminatedUnionTypes2.ts, 105, 10))

problem.name;
>problem.name : Symbol(name, Decl(discriminatedUnionTypes2.ts, 102, 14))
>problem.name : Symbol(b.name, Decl(discriminatedUnionTypes2.ts, 102, 14))
>problem : Symbol(problem, Decl(discriminatedUnionTypes2.ts, 112, 11))
>name : Symbol(name, Decl(discriminatedUnionTypes2.ts, 102, 14))
>name : Symbol(b.name, Decl(discriminatedUnionTypes2.ts, 102, 14))
}
else {
problem.other;
>problem.other : Symbol(other, Decl(discriminatedUnionTypes2.ts, 106, 14))
>problem.other : Symbol(c.other, Decl(discriminatedUnionTypes2.ts, 106, 14))
>problem : Symbol(problem, Decl(discriminatedUnionTypes2.ts, 112, 11))
>other : Symbol(other, Decl(discriminatedUnionTypes2.ts, 106, 14))
>other : Symbol(c.other, Decl(discriminatedUnionTypes2.ts, 106, 14))
}
}

12 changes: 6 additions & 6 deletions tests/baselines/reference/discriminatedUnionTypes3.symbols
Original file line number Diff line number Diff line change
@@ -5,19 +5,19 @@ type Correct = {
>Correct : Symbol(Correct, Decl(discriminatedUnionTypes3.ts, 0, 0))

code: string
>code : Symbol(code, Decl(discriminatedUnionTypes3.ts, 2, 16))
>code : Symbol(Correct.code, Decl(discriminatedUnionTypes3.ts, 2, 16))

property: true
>property : Symbol(property, Decl(discriminatedUnionTypes3.ts, 3, 13))
>property : Symbol(Correct.property, Decl(discriminatedUnionTypes3.ts, 3, 13))

err: undefined
>err : Symbol(err, Decl(discriminatedUnionTypes3.ts, 4, 15))
>err : Symbol(Correct.err, Decl(discriminatedUnionTypes3.ts, 4, 15))
}
type Err = {
>Err : Symbol(Err, Decl(discriminatedUnionTypes3.ts, 6, 1))

err: `${string} is wrong!`
>err : Symbol(err, Decl(discriminatedUnionTypes3.ts, 7, 12))
>err : Symbol(Err.err, Decl(discriminatedUnionTypes3.ts, 7, 12))
}
type SomeReturnType = Correct | Err;
>SomeReturnType : Symbol(SomeReturnType, Decl(discriminatedUnionTypes3.ts, 9, 1))
@@ -36,7 +36,7 @@ if (example.err === undefined) {
>undefined : Symbol(undefined)

example.property; // true
>example.property : Symbol(property, Decl(discriminatedUnionTypes3.ts, 3, 13))
>example.property : Symbol(Correct.property, Decl(discriminatedUnionTypes3.ts, 3, 13))
>example : Symbol(example, Decl(discriminatedUnionTypes3.ts, 12, 5))
>property : Symbol(property, Decl(discriminatedUnionTypes3.ts, 3, 13))
>property : Symbol(Correct.property, Decl(discriminatedUnionTypes3.ts, 3, 13))
}
12 changes: 6 additions & 6 deletions tests/baselines/reference/divergentAccessors1.symbols
Original file line number Diff line number Diff line change
@@ -34,10 +34,10 @@
>T_HasGetSet : Symbol(T_HasGetSet, Decl(divergentAccessors1.ts, 13, 1))

get foo(): number;
>foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))

set foo(v: number | string);
>foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>v : Symbol(v, Decl(divergentAccessors1.ts, 16, 16))
}

@@ -46,14 +46,14 @@
>T_HasGetSet : Symbol(T_HasGetSet, Decl(divergentAccessors1.ts, 13, 1))

t_hgs.foo = "32";
>t_hgs.foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>t_hgs.foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>t_hgs : Symbol(t_hgs, Decl(divergentAccessors1.ts, 19, 9))
>foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))

let r_t_hgs_foo: number = t_hgs.foo;
>r_t_hgs_foo : Symbol(r_t_hgs_foo, Decl(divergentAccessors1.ts, 21, 7))
>t_hgs.foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>t_hgs.foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>t_hgs : Symbol(t_hgs, Decl(divergentAccessors1.ts, 19, 9))
>foo : Symbol(foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
>foo : Symbol(T_HasGetSet.foo, Decl(divergentAccessors1.ts, 14, 24), Decl(divergentAccessors1.ts, 15, 26))
}

32 changes: 16 additions & 16 deletions tests/baselines/reference/divergentAccessorsTypes1.symbols
Original file line number Diff line number Diff line change
@@ -49,17 +49,17 @@ type Test3 = {
>Test3 : Symbol(Test3, Decl(divergentAccessorsTypes1.ts, 18, 1))

get foo(): string;
>foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))

set foo(s: string | number);
>foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>s : Symbol(s, Decl(divergentAccessorsTypes1.ts, 22, 12))

get bar(): string | number;
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))

set bar(s: string | number | boolean);
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>s : Symbol(s, Decl(divergentAccessorsTypes1.ts, 25, 12))

};
@@ -150,36 +150,36 @@ type Test3 = {
>Test3 : Symbol(Test3, Decl(divergentAccessorsTypes1.ts, 18, 1))

t.foo = 32;
>t.foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>t.foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))

let m: string = t.foo;
>m : Symbol(m, Decl(divergentAccessorsTypes1.ts, 55, 7))
>t.foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>t.foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>foo : Symbol(foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))
>foo : Symbol(Test3.foo, Decl(divergentAccessorsTypes1.ts, 20, 14), Decl(divergentAccessorsTypes1.ts, 21, 22))

// See how CFA interacts with out-of-type writes
t.bar = 42;
>t.bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t.bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))

let n: number = t.bar;
>n : Symbol(n, Decl(divergentAccessorsTypes1.ts, 59, 7))
>t.bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t.bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))

t.bar = false;
>t.bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t.bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))

let o = t.bar;
>o : Symbol(o, Decl(divergentAccessorsTypes1.ts, 61, 7))
>t.bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t.bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>t : Symbol(t, Decl(divergentAccessorsTypes1.ts, 53, 9))
>bar : Symbol(bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
>bar : Symbol(Test3.bar, Decl(divergentAccessorsTypes1.ts, 22, 32), Decl(divergentAccessorsTypes1.ts, 24, 31))
}
24 changes: 12 additions & 12 deletions tests/baselines/reference/dynamicNames.symbols
Original file line number Diff line number Diff line change
@@ -48,15 +48,15 @@ export declare type T3 = {
>T3 : Symbol(T3, Decl(module.ts, 14, 1))

[c0]: number;
>[c0] : Symbol([c0], Decl(module.ts, 15, 26))
>[c0] : Symbol(T3[c0], Decl(module.ts, 15, 26))
>c0 : Symbol(c0, Decl(module.ts, 0, 12))

[c1]: string;
>[c1] : Symbol([c1], Decl(module.ts, 16, 17))
>[c1] : Symbol(T3[c1], Decl(module.ts, 16, 17))
>c1 : Symbol(c1, Decl(module.ts, 1, 12))

[s0]: boolean;
>[s0] : Symbol([s0], Decl(module.ts, 17, 17))
>[s0] : Symbol(T3[s0], Decl(module.ts, 17, 17))
>s0 : Symbol(s0, Decl(module.ts, 2, 12))

};
@@ -139,19 +139,19 @@ namespace N {
>T7 : Symbol(T7, Decl(main.ts, 19, 5))

[N.c2]: number;
>[N.c2] : Symbol([N.c2], Decl(main.ts, 20, 30))
>[N.c2] : Symbol(T7[N.c2], Decl(main.ts, 20, 30))
>N.c2 : Symbol(c2, Decl(main.ts, 4, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c2 : Symbol(c2, Decl(main.ts, 4, 16))

[N.c3]: string;
>[N.c3] : Symbol([N.c3], Decl(main.ts, 21, 23))
>[N.c3] : Symbol(T7[N.c3], Decl(main.ts, 21, 23))
>N.c3 : Symbol(c3, Decl(main.ts, 5, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c3 : Symbol(c3, Decl(main.ts, 5, 16))

[N.s1]: boolean;
>[N.s1] : Symbol([N.s1], Decl(main.ts, 22, 23))
>[N.s1] : Symbol(T7[N.s1], Decl(main.ts, 22, 23))
>N.s1 : Symbol(s1, Decl(main.ts, 6, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>s1 : Symbol(s1, Decl(main.ts, 6, 16))
@@ -209,15 +209,15 @@ declare type T11 = {
>T11 : Symbol(T11, Decl(main.ts, 42, 1))

[c4]: number;
>[c4] : Symbol([c4], Decl(main.ts, 43, 20))
>[c4] : Symbol(T11[c4], Decl(main.ts, 43, 20))
>c4 : Symbol(c4, Decl(main.ts, 27, 12))

[c5]: string;
>[c5] : Symbol([c5], Decl(main.ts, 44, 17))
>[c5] : Symbol(T11[c5], Decl(main.ts, 44, 17))
>c5 : Symbol(c5, Decl(main.ts, 28, 12))

[s2]: boolean;
>[s2] : Symbol([s2], Decl(main.ts, 45, 17))
>[s2] : Symbol(T11[s2], Decl(main.ts, 45, 17))
>s2 : Symbol(s2, Decl(main.ts, 29, 12))

};
@@ -257,13 +257,13 @@ declare type T15 = {
>T15 : Symbol(T15, Decl(main.ts, 60, 1))

a: number;
>a : Symbol(a, Decl(main.ts, 61, 20))
>a : Symbol(T15.a, Decl(main.ts, 61, 20))

1: string;
>1 : Symbol(1, Decl(main.ts, 62, 14))
>1 : Symbol(T15[1], Decl(main.ts, 62, 14))

[s2]: boolean;
>[s2] : Symbol([s2], Decl(main.ts, 63, 14))
>[s2] : Symbol(T15[s2], Decl(main.ts, 63, 14))
>s2 : Symbol(s2, Decl(main.ts, 29, 12))

};
4 changes: 2 additions & 2 deletions tests/baselines/reference/dynamicNamesErrors.symbols
Original file line number Diff line number Diff line change
@@ -130,11 +130,11 @@ export type ObjectTypeVisibility = {
>ObjectTypeVisibility : Symbol(ObjectTypeVisibility, Decl(dynamicNamesErrors.ts, 46, 1))

[x]: number;
>[x] : Symbol([x], Decl(dynamicNamesErrors.ts, 48, 36))
>[x] : Symbol(ObjectTypeVisibility[x], Decl(dynamicNamesErrors.ts, 48, 36))
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))

[y](): number;
>[y] : Symbol([y], Decl(dynamicNamesErrors.ts, 49, 16))
>[y] : Symbol(ObjectTypeVisibility[y], Decl(dynamicNamesErrors.ts, 49, 16))
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))

};
58 changes: 29 additions & 29 deletions tests/baselines/reference/enumLiteralTypes3.symbols
Original file line number Diff line number Diff line change
@@ -2,18 +2,18 @@
const enum Choice { Unknown, Yes, No };
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Unknown : Symbol(Choice.Unknown, Decl(enumLiteralTypes3.ts, 0, 19))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>No : Symbol(Choice.No, Decl(enumLiteralTypes3.ts, 0, 33))

type Yes = Choice.Yes;
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 39))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

type YesNo = Choice.Yes | Choice.No;
>YesNo : Symbol(YesNo, Decl(enumLiteralTypes3.ts, 2, 22))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>No : Symbol(Choice.No, Decl(enumLiteralTypes3.ts, 0, 33))

@@ -22,14 +22,14 @@ type NoYes = Choice.No | Choice.Yes;
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>No : Symbol(Choice.No, Decl(enumLiteralTypes3.ts, 0, 33))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No;
>UnknownYesNo : Symbol(UnknownYesNo, Decl(enumLiteralTypes3.ts, 4, 36))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Unknown : Symbol(Choice.Unknown, Decl(enumLiteralTypes3.ts, 0, 19))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>No : Symbol(Choice.No, Decl(enumLiteralTypes3.ts, 0, 33))

@@ -164,9 +164,9 @@ function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

a = Choice.Yes;
>a : Symbol(a, Decl(enumLiteralTypes3.ts, 35, 12))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

a = Choice.No;
>a : Symbol(a, Decl(enumLiteralTypes3.ts, 35, 12))
@@ -182,9 +182,9 @@ function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

b = Choice.Yes;
>b : Symbol(b, Decl(enumLiteralTypes3.ts, 35, 19))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

b = Choice.No;
>b : Symbol(b, Decl(enumLiteralTypes3.ts, 35, 19))
@@ -200,9 +200,9 @@ function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

c = Choice.Yes;
>c : Symbol(c, Decl(enumLiteralTypes3.ts, 35, 29))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

c = Choice.No;
>c : Symbol(c, Decl(enumLiteralTypes3.ts, 35, 29))
@@ -218,9 +218,9 @@ function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

d = Choice.Yes;
>d : Symbol(d, Decl(enumLiteralTypes3.ts, 35, 46))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

d = Choice.No;
>d : Symbol(d, Decl(enumLiteralTypes3.ts, 35, 46))
@@ -248,9 +248,9 @@ function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

a === Choice.Yes;
>a : Symbol(a, Decl(enumLiteralTypes3.ts, 50, 12))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

a === Choice.No;
>a : Symbol(a, Decl(enumLiteralTypes3.ts, 50, 12))
@@ -266,9 +266,9 @@ function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

b === Choice.Yes;
>b : Symbol(b, Decl(enumLiteralTypes3.ts, 50, 19))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

b === Choice.No;
>b : Symbol(b, Decl(enumLiteralTypes3.ts, 50, 19))
@@ -284,9 +284,9 @@ function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

c === Choice.Yes;
>c : Symbol(c, Decl(enumLiteralTypes3.ts, 50, 29))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

c === Choice.No;
>c : Symbol(c, Decl(enumLiteralTypes3.ts, 50, 29))
@@ -302,9 +302,9 @@ function f6(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) {

d === Choice.Yes;
>d : Symbol(d, Decl(enumLiteralTypes3.ts, 50, 46))
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))

d === Choice.No;
>d : Symbol(d, Decl(enumLiteralTypes3.ts, 50, 46))
@@ -405,9 +405,9 @@ function f10(x: Yes): Yes {
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 84, 13))

case Choice.Yes: return x;
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 84, 13))

case Choice.No: return x;
@@ -436,9 +436,9 @@ function f11(x: YesNo): YesNo {
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 93, 13))

case Choice.Yes: return x;
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 93, 13))

case Choice.No: return x;
@@ -467,9 +467,9 @@ function f12(x: UnknownYesNo): UnknownYesNo {
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 102, 13))

case Choice.Yes: return x;
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 102, 13))

case Choice.No: return x;
@@ -498,9 +498,9 @@ function f13(x: Choice): Choice {
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 111, 13))

case Choice.Yes: return x;
>Choice.Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice.Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0))
>Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>Yes : Symbol(Yes, Decl(enumLiteralTypes3.ts, 0, 28))
>x : Symbol(x, Decl(enumLiteralTypes3.ts, 111, 13))

case Choice.No: return x;
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ namespace Test3 {
>Foo : Symbol(Foo, Decl(errorForUsingPropertyOfTypeAsType01.ts, 18, 17))

bar: string;
>bar : Symbol(bar, Decl(errorForUsingPropertyOfTypeAsType01.ts, 19, 23))
>bar : Symbol(Foo.bar, Decl(errorForUsingPropertyOfTypeAsType01.ts, 19, 23))
}

var x: Foo.bar = "";
12 changes: 6 additions & 6 deletions tests/baselines/reference/excessPropertyCheckWithUnions.symbols
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ type AN = { a: string } | { c: string }

type BN = { b: string }
>BN : Symbol(BN, Decl(excessPropertyCheckWithUnions.ts, 58, 39))
>b : Symbol(b, Decl(excessPropertyCheckWithUnions.ts, 59, 11))
>b : Symbol(BN.b, Decl(excessPropertyCheckWithUnions.ts, 59, 11))

type AB = { kind: "A", n: AN } | { kind: "B", n: BN }
>AB : Symbol(AB, Decl(excessPropertyCheckWithUnions.ts, 59, 23))
@@ -224,14 +224,14 @@ const abac: AB = {
// Excess property checks must match all discriminable properties
type Button = { tag: 'button'; type?: 'submit'; };
>Button : Symbol(Button, Decl(excessPropertyCheckWithUnions.ts, 74, 1))
>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 77, 15))
>type : Symbol(type, Decl(excessPropertyCheckWithUnions.ts, 77, 30))
>tag : Symbol(Button.tag, Decl(excessPropertyCheckWithUnions.ts, 77, 15))
>type : Symbol(Button.type, Decl(excessPropertyCheckWithUnions.ts, 77, 30))

type Anchor = { tag: 'a'; type?: string; href: string };
>Anchor : Symbol(Anchor, Decl(excessPropertyCheckWithUnions.ts, 77, 50))
>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 78, 15))
>type : Symbol(type, Decl(excessPropertyCheckWithUnions.ts, 78, 25))
>href : Symbol(href, Decl(excessPropertyCheckWithUnions.ts, 78, 40))
>tag : Symbol(Anchor.tag, Decl(excessPropertyCheckWithUnions.ts, 78, 15))
>type : Symbol(Anchor.type, Decl(excessPropertyCheckWithUnions.ts, 78, 25))
>href : Symbol(Anchor.href, Decl(excessPropertyCheckWithUnions.ts, 78, 40))

type Union = Button | Anchor;
>Union : Symbol(Union, Decl(excessPropertyCheckWithUnions.ts, 78, 56))
4 changes: 2 additions & 2 deletions tests/baselines/reference/exhaustiveSwitchStatements1.symbols
Original file line number Diff line number Diff line change
@@ -571,10 +571,10 @@ type O = {
>O : Symbol(O, Decl(exhaustiveSwitchStatements1.ts, 220, 1))

a: number,
>a : Symbol(a, Decl(exhaustiveSwitchStatements1.ts, 224, 10))
>a : Symbol(O.a, Decl(exhaustiveSwitchStatements1.ts, 224, 10))

b: number
>b : Symbol(b, Decl(exhaustiveSwitchStatements1.ts, 225, 14))
>b : Symbol(O.b, Decl(exhaustiveSwitchStatements1.ts, 225, 14))

};
type K = keyof O | 'c';
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ const MyComponent = () => /* @type {any} */(null);
>MyComponent : Symbol(MyComponent, Decl(input.js, 9, 5), Decl(input.js, 9, 50))

MyComponent.defaultProps = {
>MyComponent.defaultProps : Symbol(defaultProps, Decl(input.js, 4, 23))
>MyComponent.defaultProps : Symbol(StatelessComponent.defaultProps, Decl(input.js, 4, 23))
>MyComponent : Symbol(MyComponent, Decl(input.js, 9, 5), Decl(input.js, 9, 50))
>defaultProps : Symbol(defaultProps, Decl(input.js, 4, 23))
>defaultProps : Symbol(StatelessComponent.defaultProps, Decl(input.js, 4, 23))

color: "red"
>color : Symbol(color, Decl(input.js, 11, 28))
12 changes: 6 additions & 6 deletions tests/baselines/reference/for-of58.symbols
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== tests/cases/conformance/es6/for-ofStatements/for-of58.ts ===
type X = { x: 'x' };
>X : Symbol(X, Decl(for-of58.ts, 0, 0))
>x : Symbol(x, Decl(for-of58.ts, 0, 10))
>x : Symbol(X.x, Decl(for-of58.ts, 0, 10))

type Y = { y: 'y' };
>Y : Symbol(Y, Decl(for-of58.ts, 0, 20))
>y : Symbol(y, Decl(for-of58.ts, 1, 10))
>y : Symbol(Y.y, Decl(for-of58.ts, 1, 10))

declare const arr: X[] & Y[];
>arr : Symbol(arr, Decl(for-of58.ts, 3, 13))
@@ -17,13 +17,13 @@ for (const item of arr) {
>arr : Symbol(arr, Decl(for-of58.ts, 3, 13))

item.x;
>item.x : Symbol(x, Decl(for-of58.ts, 0, 10))
>item.x : Symbol(X.x, Decl(for-of58.ts, 0, 10))
>item : Symbol(item, Decl(for-of58.ts, 5, 10))
>x : Symbol(x, Decl(for-of58.ts, 0, 10))
>x : Symbol(X.x, Decl(for-of58.ts, 0, 10))

item.y;
>item.y : Symbol(y, Decl(for-of58.ts, 1, 10))
>item.y : Symbol(Y.y, Decl(for-of58.ts, 1, 10))
>item : Symbol(item, Decl(for-of58.ts, 5, 10))
>y : Symbol(y, Decl(for-of58.ts, 1, 10))
>y : Symbol(Y.y, Decl(for-of58.ts, 1, 10))
}

Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ const s2 = "x";
// or in a type definition
type Foo3 = { [s3]: number; }
>Foo3 : Symbol(Foo3, Decl(forwardRefInTypeDeclaration.ts, 6, 15))
>[s3] : Symbol([s3], Decl(forwardRefInTypeDeclaration.ts, 9, 13))
>[s3] : Symbol(Foo3[s3], Decl(forwardRefInTypeDeclaration.ts, 9, 13))
>s3 : Symbol(s3, Decl(forwardRefInTypeDeclaration.ts, 10, 5))

const s3 = "x";
Original file line number Diff line number Diff line change
@@ -5,15 +5,15 @@ type A = {
>A : Symbol(A, Decl(functionCallOnConstrainedTypeVariable.ts, 0, 0))

a: (x: number) => string
>a : Symbol(a, Decl(functionCallOnConstrainedTypeVariable.ts, 2, 10))
>a : Symbol(A.a, Decl(functionCallOnConstrainedTypeVariable.ts, 2, 10))
>x : Symbol(x, Decl(functionCallOnConstrainedTypeVariable.ts, 3, 6))

};
type B = {
>B : Symbol(B, Decl(functionCallOnConstrainedTypeVariable.ts, 4, 2))

a: (x: boolean) => string
>a : Symbol(a, Decl(functionCallOnConstrainedTypeVariable.ts, 5, 10))
>a : Symbol(B.a, Decl(functionCallOnConstrainedTypeVariable.ts, 5, 10))
>x : Symbol(x, Decl(functionCallOnConstrainedTypeVariable.ts, 6, 6))

};
6 changes: 3 additions & 3 deletions tests/baselines/reference/genericContextualTypes1.symbols
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
type Box<T> = { value: T };
>Box : Symbol(Box, Decl(genericContextualTypes1.ts, 0, 0))
>T : Symbol(T, Decl(genericContextualTypes1.ts, 0, 9))
>value : Symbol(value, Decl(genericContextualTypes1.ts, 0, 15))
>value : Symbol(Box.value, Decl(genericContextualTypes1.ts, 0, 15))
>T : Symbol(T, Decl(genericContextualTypes1.ts, 0, 9))

declare function wrap<A, B>(f: (a: A) => B): (a: A) => B;
@@ -284,9 +284,9 @@ const f31: <T extends Box<number>>(a: T[]) => T[] = arrayFilter(x => x.value > 1
>T : Symbol(T, Decl(genericContextualTypes1.ts, 41, 12))
>arrayFilter : Symbol(arrayFilter, Decl(genericContextualTypes1.ts, 33, 5))
>x : Symbol(x, Decl(genericContextualTypes1.ts, 41, 64))
>x.value : Symbol(value, Decl(genericContextualTypes1.ts, 0, 15))
>x.value : Symbol(Box.value, Decl(genericContextualTypes1.ts, 0, 15))
>x : Symbol(x, Decl(genericContextualTypes1.ts, 41, 64))
>value : Symbol(value, Decl(genericContextualTypes1.ts, 0, 15))
>value : Symbol(Box.value, Decl(genericContextualTypes1.ts, 0, 15))

const f40: <A, B>(b: B, a: A) => [A, B] = flip(zip);
>f40 : Symbol(f40, Decl(genericContextualTypes1.ts, 43, 5))
64 changes: 32 additions & 32 deletions tests/baselines/reference/genericDefaults.symbols
Original file line number Diff line number Diff line change
@@ -2162,134 +2162,134 @@ type DerivedProps = keyof Derived03;
type t00<T = number> = { a: T; }
>t00 : Symbol(t00, Decl(genericDefaults.ts, 466, 36))
>T : Symbol(T, Decl(genericDefaults.ts, 468, 9))
>a : Symbol(a, Decl(genericDefaults.ts, 468, 24))
>a : Symbol(t00.a, Decl(genericDefaults.ts, 468, 24))
>T : Symbol(T, Decl(genericDefaults.ts, 468, 9))

const t00c00 = (<t00>x).a;
>t00c00 : Symbol(t00c00, Decl(genericDefaults.ts, 469, 5))
>(<t00>x).a : Symbol(a, Decl(genericDefaults.ts, 468, 24))
>(<t00>x).a : Symbol(t00.a, Decl(genericDefaults.ts, 468, 24))
>t00 : Symbol(t00, Decl(genericDefaults.ts, 466, 36))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 468, 24))
>a : Symbol(t00.a, Decl(genericDefaults.ts, 468, 24))

const t00c01 = (<t00<number>>x).a;
>t00c01 : Symbol(t00c01, Decl(genericDefaults.ts, 470, 5))
>(<t00<number>>x).a : Symbol(a, Decl(genericDefaults.ts, 468, 24))
>(<t00<number>>x).a : Symbol(t00.a, Decl(genericDefaults.ts, 468, 24))
>t00 : Symbol(t00, Decl(genericDefaults.ts, 466, 36))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 468, 24))
>a : Symbol(t00.a, Decl(genericDefaults.ts, 468, 24))

type t01<T, U = T> = { a: [T, U]; }
>t01 : Symbol(t01, Decl(genericDefaults.ts, 470, 34))
>T : Symbol(T, Decl(genericDefaults.ts, 472, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 472, 11))
>T : Symbol(T, Decl(genericDefaults.ts, 472, 9))
>a : Symbol(a, Decl(genericDefaults.ts, 472, 22))
>a : Symbol(t01.a, Decl(genericDefaults.ts, 472, 22))
>T : Symbol(T, Decl(genericDefaults.ts, 472, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 472, 11))

const t01c00 = (<t01<number>>x).a;
>t01c00 : Symbol(t01c00, Decl(genericDefaults.ts, 473, 5))
>(<t01<number>>x).a : Symbol(a, Decl(genericDefaults.ts, 472, 22))
>(<t01<number>>x).a : Symbol(t01.a, Decl(genericDefaults.ts, 472, 22))
>t01 : Symbol(t01, Decl(genericDefaults.ts, 470, 34))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 472, 22))
>a : Symbol(t01.a, Decl(genericDefaults.ts, 472, 22))

const t01c01 = (<t01<number, string>>x).a;
>t01c01 : Symbol(t01c01, Decl(genericDefaults.ts, 474, 5))
>(<t01<number, string>>x).a : Symbol(a, Decl(genericDefaults.ts, 472, 22))
>(<t01<number, string>>x).a : Symbol(t01.a, Decl(genericDefaults.ts, 472, 22))
>t01 : Symbol(t01, Decl(genericDefaults.ts, 470, 34))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 472, 22))
>a : Symbol(t01.a, Decl(genericDefaults.ts, 472, 22))

type t02<T extends number, U = T> = { a: [T, U]; }
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>T : Symbol(T, Decl(genericDefaults.ts, 476, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 476, 26))
>T : Symbol(T, Decl(genericDefaults.ts, 476, 9))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>T : Symbol(T, Decl(genericDefaults.ts, 476, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 476, 26))

const t02c00 = (<t02<number>>x).a;
>t02c00 : Symbol(t02c00, Decl(genericDefaults.ts, 477, 5))
>(<t02<number>>x).a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>(<t02<number>>x).a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))

const t02c01 = (<t02<1>>x).a;
>t02c01 : Symbol(t02c01, Decl(genericDefaults.ts, 478, 5))
>(<t02<1>>x).a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>(<t02<1>>x).a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))

const t02c02 = (<t02<number, number>>x).a;
>t02c02 : Symbol(t02c02, Decl(genericDefaults.ts, 479, 5))
>(<t02<number, number>>x).a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>(<t02<number, number>>x).a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))

const t02c03 = (<t02<1, number>>x).a;
>t02c03 : Symbol(t02c03, Decl(genericDefaults.ts, 480, 5))
>(<t02<1, number>>x).a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>(<t02<1, number>>x).a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))

const t02c04 = (<t02<number, 1>>x).a;
>t02c04 : Symbol(t02c04, Decl(genericDefaults.ts, 481, 5))
>(<t02<number, 1>>x).a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>(<t02<number, 1>>x).a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))
>t02 : Symbol(t02, Decl(genericDefaults.ts, 474, 42))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 476, 37))
>a : Symbol(t02.a, Decl(genericDefaults.ts, 476, 37))

type t03<T extends number, U extends T = T> = { a: [T, U]; }
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>T : Symbol(T, Decl(genericDefaults.ts, 483, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 483, 26))
>T : Symbol(T, Decl(genericDefaults.ts, 483, 9))
>T : Symbol(T, Decl(genericDefaults.ts, 483, 9))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>T : Symbol(T, Decl(genericDefaults.ts, 483, 9))
>U : Symbol(U, Decl(genericDefaults.ts, 483, 26))

const t03c00 = (<t03<number>>x).a;
>t03c00 : Symbol(t03c00, Decl(genericDefaults.ts, 484, 5))
>(<t03<number>>x).a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>(<t03<number>>x).a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))

const t03c01 = (<t03<1>>x).a;
>t03c01 : Symbol(t03c01, Decl(genericDefaults.ts, 485, 5))
>(<t03<1>>x).a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>(<t03<1>>x).a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))

const t03c02 = (<t03<number, number>>x).a;
>t03c02 : Symbol(t03c02, Decl(genericDefaults.ts, 486, 5))
>(<t03<number, number>>x).a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>(<t03<number, number>>x).a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))

const t03c03 = (<t03<1, 1>>x).a;
>t03c03 : Symbol(t03c03, Decl(genericDefaults.ts, 487, 5))
>(<t03<1, 1>>x).a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>(<t03<1, 1>>x).a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))

const t03c04 = (<t03<number, 1>>x).a;
>t03c04 : Symbol(t03c04, Decl(genericDefaults.ts, 488, 5))
>(<t03<number, 1>>x).a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>(<t03<number, 1>>x).a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))
>t03 : Symbol(t03, Decl(genericDefaults.ts, 481, 37))
>x : Symbol(x, Decl(genericDefaults.ts, 13, 13))
>a : Symbol(a, Decl(genericDefaults.ts, 483, 47))
>a : Symbol(t03.a, Decl(genericDefaults.ts, 483, 47))

// https://github.com/Microsoft/TypeScript/issues/16221
interface SelfReference<T = SelfReference<string>> {}
4 changes: 2 additions & 2 deletions tests/baselines/reference/genericFunctionInference1.symbols
Original file line number Diff line number Diff line change
@@ -631,8 +631,8 @@ declare function myHoc<P>(C: CompClass<P>): CompClass<P>;
type GenericProps<T> = { foo: number, stuff: T };
>GenericProps : Symbol(GenericProps, Decl(genericFunctionInference1.ts, 103, 57))
>T : Symbol(T, Decl(genericFunctionInference1.ts, 105, 18))
>foo : Symbol(foo, Decl(genericFunctionInference1.ts, 105, 24))
>stuff : Symbol(stuff, Decl(genericFunctionInference1.ts, 105, 37))
>foo : Symbol(GenericProps.foo, Decl(genericFunctionInference1.ts, 105, 24))
>stuff : Symbol(GenericProps.stuff, Decl(genericFunctionInference1.ts, 105, 37))
>T : Symbol(T, Decl(genericFunctionInference1.ts, 105, 18))

declare class GenericComp<T> extends Comp<GenericProps<T>> {}
4 changes: 2 additions & 2 deletions tests/baselines/reference/genericFunctionInference1.types
Original file line number Diff line number Diff line change
@@ -801,7 +801,7 @@ const fn20 = pipe((_a?: {}) => 1);
>fn20 : (_a?: {} | undefined) => number
>pipe((_a?: {}) => 1) : (_a?: {} | undefined) => number
>pipe : { <A extends any[], B>(ab: (...args: A) => B): (...args: A) => B; <A extends any[], B, C>(ab: (...args: A) => B, bc: (b: B) => C): (...args: A) => C; <A extends any[], B, C, D>(ab: (...args: A) => B, bc: (b: B) => C, cd: (c: C) => D): (...args: A) => D; }
>(_a?: {}) => 1 : (_a?: {} | undefined) => number
>(_a?: {}) => 1 : (_a?: {}) => number
>_a : {} | undefined
>1 : 1

@@ -968,7 +968,7 @@ const fn62 = pipe(
// Repro from #30297

declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
>foo2 : <T, U = T>(fn: T, a?: U, b?: U) => [T, U]
>fn : T
>a : U | undefined
>b : U | undefined
Loading