diff --git a/tests/baselines/reference/destructuringParameterProperties5.errors.txt b/tests/baselines/reference/destructuringParameterProperties5.errors.txt index 8eff6ad0feb..e0540240b61 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties5.errors.txt @@ -1,15 +1,15 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. -tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature. -tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature. -tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'. -tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. - Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. - Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'. + Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'. + Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. ==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (10 errors) ==== @@ -21,11 +21,11 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1187: A parameter property may not be declared using a binding pattern. ~~ -!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature. +!!! error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature. ~~ -!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature. +!!! error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature. ~~ -!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature. +!!! error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature. var foo: any = x1 || x2 || x3 || y || z; var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; ~~ @@ -43,7 +43,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]); ~~~~~~ -!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. -!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. -!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. +!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'. +!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'. +!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; \ No newline at end of file diff --git a/tests/baselines/reference/implicitIndexSignatures.types b/tests/baselines/reference/implicitIndexSignatures.types index ac8da0c7b6c..0b68f136e2e 100644 --- a/tests/baselines/reference/implicitIndexSignatures.types +++ b/tests/baselines/reference/implicitIndexSignatures.types @@ -1,6 +1,6 @@ === tests/cases/compiler/implicitIndexSignatures.ts === type StringMap = { [x: string]: string }; ->StringMap : { [x: string]: string; } +>StringMap : StringMap >x : string const empty1 = {}; @@ -24,12 +24,12 @@ let names2: { a: string, b: string }; >b : string let map: StringMap; ->map : { [x: string]: string; } ->StringMap : { [x: string]: string; } +>map : StringMap +>StringMap : StringMap map = { x: "xxx", y: "yyy" }; >map = { x: "xxx", y: "yyy" } : { x: string; y: string; } ->map : { [x: string]: string; } +>map : StringMap >{ x: "xxx", y: "yyy" } : { x: string; y: string; } >x : string >"xxx" : "xxx" @@ -38,22 +38,22 @@ map = { x: "xxx", y: "yyy" }; map = empty1; >map = empty1 : {} ->map : { [x: string]: string; } +>map : StringMap >empty1 : {} map = empty2; >map = empty2 : {} ->map : { [x: string]: string; } +>map : StringMap >empty2 : {} map = names1; >map = names1 : { a: string; b: string; } ->map : { [x: string]: string; } +>map : StringMap >names1 : { a: string; b: string; } map = names2; >map = names2 : { a: string; b: string; } ->map : { [x: string]: string; } +>map : StringMap >names2 : { a: string; b: string; } declare function getStringIndexValue(map: { [x: string]: T }): T; diff --git a/tests/baselines/reference/intersectionTypeNormalization.types b/tests/baselines/reference/intersectionTypeNormalization.types index 10ef50ae1b4..99d0ecb1f3a 100644 --- a/tests/baselines/reference/intersectionTypeNormalization.types +++ b/tests/baselines/reference/intersectionTypeNormalization.types @@ -189,7 +189,7 @@ var z: Z4; // Repro from #9919 type ToString = { ->ToString : { toString(): string; } +>ToString : ToString toString(): string; >toString : () => string @@ -207,18 +207,18 @@ type BoxedValue = { kind: 'int', num: number } type IntersectionFail = BoxedValue & ToString >IntersectionFail : IntersectionFail >BoxedValue : BoxedValue ->ToString : { toString(): string; } +>ToString : ToString type IntersectionInline = { kind: 'int', num: number } & ToString >IntersectionInline : IntersectionInline >kind : "int" >num : number ->ToString : { toString(): string; } +>ToString : ToString | { kind: 'string', str: string } & ToString >kind : "string" >str : string ->ToString : { toString(): string; } +>ToString : ToString function getValueAsString(value: IntersectionFail): string { >getValueAsString : (value: IntersectionFail) => string @@ -236,11 +236,11 @@ function getValueAsString(value: IntersectionFail): string { >'' + value.num : string >'' : "" >value.num : number ->value : { kind: "int"; num: number; } & { toString(): string; } +>value : { kind: "int"; num: number; } & ToString >num : number } return value.str; >value.str : string ->value : { kind: "string"; str: string; } & { toString(): string; } +>value : { kind: "string"; str: string; } & ToString >str : string } diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index a5395db8292..c252ea4e2bd 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -42,7 +42,7 @@ class Options { } type Dictionary = { [x: string]: T }; ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >T : T >x : string >T : T @@ -88,7 +88,7 @@ type K11 = keyof Shape[]; // number | "length" | "toString" | ... type K12 = keyof Dictionary; // string | number >K12 : string | number ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >Shape : Shape type K13 = keyof {}; // never @@ -128,7 +128,7 @@ type K20 = KeyOf; // "name" | "width" | "height" | "visible" type K21 = KeyOf>; // string | number >K21 : string | number >KeyOf : keyof T ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >Shape : Shape type NAME = "name"; @@ -201,17 +201,17 @@ type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false type Q50 = Dictionary["howdy"]; // Shape >Q50 : Shape ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >Shape : Shape type Q51 = Dictionary[123]; // Shape >Q51 : Shape ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >Shape : Shape type Q52 = Dictionary[E.B]; // Shape >Q52 : Shape ->Dictionary : { [x: string]: T; } +>Dictionary : Dictionary >Shape : Shape >E : any >B : E.B diff --git a/tests/baselines/reference/noErrorTruncation.errors.txt b/tests/baselines/reference/noErrorTruncation.errors.txt index af3acb54bba..d5244df81a8 100644 --- a/tests/baselines/reference/noErrorTruncation.errors.txt +++ b/tests/baselines/reference/noErrorTruncation.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'. +tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'. ==== tests/cases/compiler/noErrorTruncation.ts (1 errors) ==== @@ -13,7 +13,7 @@ tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not const x: SomeLongOptionA ~ -!!! error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'. +!!! error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'. | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD diff --git a/tests/baselines/reference/nounusedTypeParameterConstraint.types b/tests/baselines/reference/nounusedTypeParameterConstraint.types index 8f2de483d26..0ded5540092 100644 --- a/tests/baselines/reference/nounusedTypeParameterConstraint.types +++ b/tests/baselines/reference/nounusedTypeParameterConstraint.types @@ -8,7 +8,7 @@ import { IEventSourcedEntity } from "./bar"; >IEventSourcedEntity : any export type DomainEntityConstructor = { new(): TEntity; }; ->DomainEntityConstructor : new () => TEntity +>DomainEntityConstructor : DomainEntityConstructor >TEntity : TEntity >IEventSourcedEntity : IEventSourcedEntity >TEntity : TEntity diff --git a/tests/baselines/reference/typeAliasDeclarationEmit2.types b/tests/baselines/reference/typeAliasDeclarationEmit2.types index bc8bd30935e..2cbee5aae4c 100644 --- a/tests/baselines/reference/typeAliasDeclarationEmit2.types +++ b/tests/baselines/reference/typeAliasDeclarationEmit2.types @@ -1,7 +1,7 @@ === tests/cases/compiler/typeAliasDeclarationEmit2.ts === export type A = { value: a }; ->A : { value: a; } +>A : A >a : a >value : a >a : a diff --git a/tests/baselines/reference/typeAliases.types b/tests/baselines/reference/typeAliases.types index 1d798bc14a6..6c8e897480c 100644 --- a/tests/baselines/reference/typeAliases.types +++ b/tests/baselines/reference/typeAliases.types @@ -104,7 +104,7 @@ var x9: T9; >T9 : T9 type T10 = { x: number }; ->T10 : { x: number; } +>T10 : T10 >x : number var x10: { x: number }; @@ -113,17 +113,17 @@ var x10: { x: number }; var x10: T10; >x10 : { x: number; } ->T10 : { x: number; } +>T10 : T10 type T11 = { new(): boolean }; ->T11 : new () => boolean +>T11 : T11 var x11: { new(): boolean }; >x11 : new () => boolean var x11: T11; >x11 : new () => boolean ->T11 : new () => boolean +>T11 : T11 interface I13 { x: string }; >I13 : I13 diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types index 6e3997c2d1f..a75a997eb78 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types @@ -11,7 +11,7 @@ type TreeNode = { } type TreeNodeMiddleman = { ->TreeNodeMiddleman : { name: string; parent: TreeNode; } +>TreeNodeMiddleman : TreeNodeMiddleman name: string; >name : string @@ -22,17 +22,17 @@ type TreeNodeMiddleman = { } var nodes: TreeNodeMiddleman[]; ->nodes : { name: string; parent: TreeNode; }[] ->TreeNodeMiddleman : { name: string; parent: TreeNode; } +>nodes : TreeNodeMiddleman[] +>TreeNodeMiddleman : TreeNodeMiddleman nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : { (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; } ->nodes : { name: string; parent: TreeNode; }[] ->map : { (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; } ->n => n.name : (n: { name: string; parent: TreeNode; }) => string ->n : { name: string; parent: TreeNode; } +>nodes.map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; } +>nodes : TreeNodeMiddleman[] +>map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; } +>n => n.name : (n: TreeNodeMiddleman) => string +>n : TreeNodeMiddleman >n.name : string ->n : { name: string; parent: TreeNode; } +>n : TreeNodeMiddleman >name : string diff --git a/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types b/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types index 478363669b4..f793ca34548 100644 --- a/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types +++ b/tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types @@ -1,18 +1,18 @@ === tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsPrimitiveIntersection.ts === type Tag = {__tag: any}; ->Tag : { __tag: any; } +>Tag : Tag >__tag : any declare function isNonBlank(value: string) : value is (string & Tag); ->isNonBlank : (value: string) => value is string & { __tag: any; } +>isNonBlank : (value: string) => value is string & Tag >value : string >value : any ->Tag : { __tag: any; } +>Tag : Tag declare function doThis(value: string & Tag): void; ->doThis : (value: string & { __tag: any; }) => void ->value : string & { __tag: any; } ->Tag : { __tag: any; } +>doThis : (value: string & Tag) => void +>value : string & Tag +>Tag : Tag declare function doThat(value: string) : void; >doThat : (value: string) => void @@ -23,13 +23,13 @@ let value: string; if (isNonBlank(value)) { >isNonBlank(value) : boolean ->isNonBlank : (value: string) => value is string & { __tag: any; } +>isNonBlank : (value: string) => value is string & Tag >value : string doThis(value); >doThis(value) : void ->doThis : (value: string & { __tag: any; }) => void ->value : string & { __tag: any; } +>doThis : (value: string & Tag) => void +>value : string & Tag } else { doThat(value);