From 5c21f4312154a5fa9a09c98ec621ce01fbafba08 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 27 Aug 2019 06:51:47 -0400 Subject: [PATCH] Accept new baselines --- .../reference/api/tsserverlibrary.d.ts | 4 +- tests/baselines/reference/api/typescript.d.ts | 4 +- .../baselines/reference/arrayFrom.errors.txt | 2 + .../reference/castingTuple.errors.txt | 2 + .../reference/checkJsxChildrenProperty3.types | 4 +- .../checkJsxChildrenProperty4.errors.txt | 16 +- .../reference/checkJsxChildrenProperty4.types | 4 +- .../complexRecursiveCollections.types | 16 +- .../reference/conditionalTypes1.types | 2 +- .../contextualSignatureInstantiation.types | 2 +- .../contextualTypingOfOptionalMembers.types | 14 +- ...EmitDestructuringParameterProperties.types | 2 +- .../reference/destructuringControlFlow.types | 2 +- .../destructuringInFunctionType.types | 6 +- .../destructuringParameterProperties1.types | 2 +- .../destructuringParameterProperties5.types | 2 +- ...ectDependenceBetweenTypeAliases.errors.txt | 29 +--- .../directDependenceBetweenTypeAliases.types | 34 ++--- ...cessPrivateMemberOfGenericConstraint.types | 2 +- tests/baselines/reference/inferTypes1.types | 12 +- .../interfaceExtendsObjectIntersection.types | 4 +- ...rfaceExtendsObjectIntersectionErrors.types | 4 +- .../intersectionTypeWithLeadingOperator.types | 2 +- ...onfusableWithMultipleChildrenNoError.types | 4 +- .../reference/mapOnTupleTypes02.types | 8 +- .../optionalTupleElements1.errors.txt | 24 +-- .../reference/optionalTupleElements1.types | 140 +++++++++--------- .../reference/readonlyArraysAndTuples.types | 4 +- .../reference/readonlyArraysAndTuples2.types | 4 +- .../reference/recursiveMappedTypes.types | 8 +- .../recursiveResolveTypeMembers.errors.txt | 4 +- .../recursiveTypesWithTypeof.errors.txt | 7 +- .../reference/recursiveTypesWithTypeof.types | 6 +- .../reference/restTupleElements1.types | 40 ++--- ...nDestructuringForArrayBindingPattern.types | 66 ++++----- ...DestructuringForArrayBindingPattern2.types | 106 ++++++------- ...gForArrayBindingPatternDefaultValues.types | 60 ++++---- ...ForArrayBindingPatternDefaultValues2.types | 90 +++++------ ...estructuringForOfArrayBindingPattern.types | 132 ++++++++--------- ...structuringForOfArrayBindingPattern2.types | 132 ++++++++--------- ...orOfArrayBindingPatternDefaultValues.types | 120 +++++++-------- ...rOfArrayBindingPatternDefaultValues2.types | 120 +++++++-------- ...cturingParametertArrayBindingPattern.types | 36 ++--- ...turingParametertArrayBindingPattern2.types | 36 ++--- ...tertArrayBindingPatternDefaultValues.types | 36 ++--- ...ertArrayBindingPatternDefaultValues2.types | 28 ++-- ...VariableStatementArrayBindingPattern.types | 14 +- ...ariableStatementArrayBindingPattern2.types | 14 +- ...ariableStatementArrayBindingPattern3.types | 104 ++++++------- ...mentArrayBindingPatternDefaultValues.types | 14 +- ...entArrayBindingPatternDefaultValues2.types | 12 +- ...entArrayBindingPatternDefaultValues3.types | 94 ++++++------ .../reference/specedNoStackBlown.types | 4 +- .../spreadBooleanRespectsFreshness.types | 6 +- .../reference/spreadTypeVariable.types | 2 +- .../baselines/reference/tupleTypes.errors.txt | 4 +- tests/baselines/reference/typeAliases.types | 12 +- ...dNarrowsIndexedAccessOfKnownProperty.types | 8 +- .../reference/typeInferenceLiteralUnion.types | 4 +- .../typePredicateStructuralMatch.types | 54 +++---- .../unionTypeWithLeadingOperator.types | 2 +- .../reference/unionsOfTupleTypes1.errors.txt | 16 +- .../reference/unionsOfTupleTypes1.types | 42 +++--- 63 files changed, 885 insertions(+), 903 deletions(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index bffe2114d19..c70f389e210 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2351,7 +2351,9 @@ declare namespace ts { */ export interface TypeReference extends ObjectType { target: GenericType; - typeArguments?: ReadonlyArray; + node?: ArrayTypeNode | TupleTypeNode; + } + export interface DeferredTypeReference extends TypeReference { } export interface GenericType extends InterfaceType, TypeReference { } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 457a1acb227..c7b96ded9b2 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2351,7 +2351,9 @@ declare namespace ts { */ export interface TypeReference extends ObjectType { target: GenericType; - typeArguments?: ReadonlyArray; + node?: ArrayTypeNode | TupleTypeNode; + } + export interface DeferredTypeReference extends TypeReference { } export interface GenericType extends InterfaceType, TypeReference { } diff --git a/tests/baselines/reference/arrayFrom.errors.txt b/tests/baselines/reference/arrayFrom.errors.txt index 615bd1bf769..7d9645f9420 100644 --- a/tests/baselines/reference/arrayFrom.errors.txt +++ b/tests/baselines/reference/arrayFrom.errors.txt @@ -1,6 +1,7 @@ tests/cases/compiler/arrayFrom.ts(20,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. Property 'b' is missing in type 'A' but required in type 'B'. tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. + Type 'A' is not assignable to type 'B'. ==== tests/cases/compiler/arrayFrom.ts (2 errors) ==== @@ -33,6 +34,7 @@ tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assigna const result6: B[] = Array.from(inputALike); // expect error ~~~~~~~ !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. +!!! error TS2322: Type 'A' is not assignable to type 'B'. const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); const result8: A[] = Array.from(inputARand); const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); diff --git a/tests/baselines/reference/castingTuple.errors.txt b/tests/baselines/reference/castingTuple.errors.txt index 0a1d592e8b1..56941dfddd0 100644 --- a/tests/baselines/reference/castingTuple.errors.txt +++ b/tests/baselines/reference/castingTuple.errors.txt @@ -4,6 +4,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(14,15): error TS2352: Conver Types of property 'length' are incompatible. Type '3' is not comparable to type '2'. tests/cases/conformance/types/tuple/castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'. tests/cases/conformance/types/tuple/castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property '2' is missing in type '[C, D]' but required in type '[C, D, A]'. tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2493: Tuple type '[C, D, A]' of length '3' has no element at index '5'. @@ -40,6 +41,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot var longer = numStrTuple as [number, string, boolean] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'. var classCDTuple: [C, D] = [new C(), new D()]; var interfaceIITuple = <[I, I]>classCDTuple; var classCDATuple = <[C, D, A]>classCDTuple; diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.types b/tests/baselines/reference/checkJsxChildrenProperty3.types index f2ed3dc8fd0..2d4380a1975 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.types +++ b/tests/baselines/reference/checkJsxChildrenProperty3.types @@ -31,11 +31,11 @@ class FetchUser extends React.Component { ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element ->this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) +>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) >this.props : IFetchUserProps & { children?: React.ReactNode; } >this : this >props : IFetchUserProps & { children?: React.ReactNode; } ->children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) +>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) >this.state.result : any >this.state : any >this : this diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index 34bd2189964..40eb1d77677 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,8 +1,8 @@ tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? -tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. - Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props -tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. - Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props +tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. + Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. +tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. + Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. ==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== @@ -50,8 +50,8 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. -!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. +!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. !!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression? { user => ( ~~~~~~~~~ @@ -59,8 +59,8 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. -!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. +!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. !!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression? ); diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.types b/tests/baselines/reference/checkJsxChildrenProperty4.types index 067e8f2611a..4f753cf9f3b 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.types +++ b/tests/baselines/reference/checkJsxChildrenProperty4.types @@ -31,11 +31,11 @@ class FetchUser extends React.Component { ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element ->this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) +>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) >this.props : IFetchUserProps & { children?: React.ReactNode; } >this : this >props : IFetchUserProps & { children?: React.ReactNode; } ->children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) +>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) >this.state.result : any >this.state : any >this : this diff --git a/tests/baselines/reference/complexRecursiveCollections.types b/tests/baselines/reference/complexRecursiveCollections.types index feaff620486..2450407e90d 100644 --- a/tests/baselines/reference/complexRecursiveCollections.types +++ b/tests/baselines/reference/complexRecursiveCollections.types @@ -1029,28 +1029,28 @@ declare module Immutable { >value : T[K] merge(...collections: Array | Iterable<[string, any]>>): this; ->merge : (...collections: (Iterable<[string, any]> | Partial)[]) => this ->collections : (Iterable<[string, any]> | Partial)[] +>merge : (...collections: (Partial | Iterable<[string, any]>)[]) => this +>collections : (Partial | Iterable<[string, any]>)[] mergeDeep(...collections: Array | Iterable<[string, any]>>): this; ->mergeDeep : (...collections: (Iterable<[string, any]> | Partial)[]) => this ->collections : (Iterable<[string, any]> | Partial)[] +>mergeDeep : (...collections: (Partial | Iterable<[string, any]>)[]) => this +>collections : (Partial | Iterable<[string, any]>)[] mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array | Iterable<[string, any]>>): this; ->mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Iterable<[string, any]> | Partial)[]) => this +>mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Partial | Iterable<[string, any]>)[]) => this >merger : (oldVal: any, newVal: any, key: keyof T) => any >oldVal : any >newVal : any >key : keyof T ->collections : (Iterable<[string, any]> | Partial)[] +>collections : (Partial | Iterable<[string, any]>)[] mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array | Iterable<[string, any]>>): this; ->mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Iterable<[string, any]> | Partial)[]) => this +>mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Partial | Iterable<[string, any]>)[]) => this >merger : (oldVal: any, newVal: any, key: any) => any >oldVal : any >newVal : any >key : any ->collections : (Iterable<[string, any]> | Partial)[] +>collections : (Partial | Iterable<[string, any]>)[] delete(key: K): this; >delete : (key: K) => this diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index 234fc071d74..2d5af28ca5e 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -494,7 +494,7 @@ function f21(x: T, y: ZeroOf) { } type T35 = T[]; ->T35 : T[] +>T35 : T35 >a : string >b : number diff --git a/tests/baselines/reference/contextualSignatureInstantiation.types b/tests/baselines/reference/contextualSignatureInstantiation.types index ae5a4000537..57e8f79a28f 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation.types +++ b/tests/baselines/reference/contextualSignatureInstantiation.types @@ -108,7 +108,7 @@ var d = bar(1, "one", h); // Should be number[] | string[] var d = bar("one", 1, h); // Should be number[] | string[] >d : number[] | string[] ->bar("one", 1, h) : number[] | string[] +>bar("one", 1, h) : string[] | number[] >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V >"one" : "one" >1 : 1 diff --git a/tests/baselines/reference/contextualTypingOfOptionalMembers.types b/tests/baselines/reference/contextualTypingOfOptionalMembers.types index f4a9e23190d..9df692608c2 100644 --- a/tests/baselines/reference/contextualTypingOfOptionalMembers.types +++ b/tests/baselines/reference/contextualTypingOfOptionalMembers.types @@ -124,17 +124,17 @@ app2({ type ActionsArray = ((state: State) => State)[]; ->ActionsArray : ((state: State) => State)[] +>ActionsArray : ActionsArray >state : State declare function app3>(obj: Options): void; ->app3 : State)[]>(obj: Options) => void +>app3 : >(obj: Options) => void >obj : Options app3({ >app3({ state: 100, actions: [ s => s // Should be typed number => number ], view: (s, a) => undefined as any,}) : void ->app3 : State)[]>(obj: Options) => void ->{ state: 100, actions: [ s => s // Should be typed number => number ], view: (s, a) => undefined as any,} : { state: number; actions: ((s: number) => number)[]; view: (s: number, a: ((state: number) => number)[]) => any; } +>app3 : >(obj: Options) => void +>{ state: 100, actions: [ s => s // Should be typed number => number ], view: (s, a) => undefined as any,} : { state: number; actions: ((s: number) => number)[]; view: (s: number, a: ActionsArray) => any; } state: 100, >state : number @@ -151,10 +151,10 @@ app3({ ], view: (s, a) => undefined as any, ->view : (s: number, a: ((state: number) => number)[]) => any ->(s, a) => undefined as any : (s: number, a: ((state: number) => number)[]) => any +>view : (s: number, a: ActionsArray) => any +>(s, a) => undefined as any : (s: number, a: ActionsArray) => any >s : number ->a : ((state: number) => number)[] +>a : ActionsArray >undefined as any : any >undefined : undefined diff --git a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.types b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.types index b7407b0232f..d76fd67f9d6 100644 --- a/tests/baselines/reference/declarationEmitDestructuringParameterProperties.types +++ b/tests/baselines/reference/declarationEmitDestructuringParameterProperties.types @@ -10,7 +10,7 @@ class C1 { } type TupleType1 =[string, number, boolean]; ->TupleType1 : [string, number, boolean] +>TupleType1 : TupleType1 class C2 { >C2 : C2 diff --git a/tests/baselines/reference/destructuringControlFlow.types b/tests/baselines/reference/destructuringControlFlow.types index 347aae32c10..b6b9967ba43 100644 --- a/tests/baselines/reference/destructuringControlFlow.types +++ b/tests/baselines/reference/destructuringControlFlow.types @@ -161,7 +161,7 @@ function f4() { // Repro from #31770 type KeyValue = [string, string?]; ->KeyValue : [string, (string | undefined)?] +>KeyValue : KeyValue let [key, value]: KeyValue = ["foo"]; >key : string diff --git a/tests/baselines/reference/destructuringInFunctionType.types b/tests/baselines/reference/destructuringInFunctionType.types index c6c0f439ac5..b5b0ff041c6 100644 --- a/tests/baselines/reference/destructuringInFunctionType.types +++ b/tests/baselines/reference/destructuringInFunctionType.types @@ -9,7 +9,7 @@ interface c { c } >c : any type T1 = ([a, b, c]); ->T1 : [a, b, c] +>T1 : T1 type F1 = ([a, b, c]) => void; >F1 : F1 @@ -26,7 +26,7 @@ type F2 = ({ a }) => void; >a : any type T3 = ([{ a: b }, { b: a }]); ->T3 : [{ a: b; }, { b: a; }] +>T3 : T3 >a : b >b : a @@ -38,7 +38,7 @@ type F3 = ([{ a: b }, { b: a }]) => void; >a : any type T4 = ([{ a: [b, c] }]); ->T4 : [{ a: [b, c]; }] +>T4 : T4 >a : [b, c] type F4 = ([{ a: [b, c] }]) => void; diff --git a/tests/baselines/reference/destructuringParameterProperties1.types b/tests/baselines/reference/destructuringParameterProperties1.types index ff12edbac2e..13bacf49b13 100644 --- a/tests/baselines/reference/destructuringParameterProperties1.types +++ b/tests/baselines/reference/destructuringParameterProperties1.types @@ -10,7 +10,7 @@ class C1 { } type TupleType1 = [string, number, boolean]; ->TupleType1 : [string, number, boolean] +>TupleType1 : TupleType1 class C2 { >C2 : C2 diff --git a/tests/baselines/reference/destructuringParameterProperties5.types b/tests/baselines/reference/destructuringParameterProperties5.types index 60c3d074c6e..976b79e9495 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.types +++ b/tests/baselines/reference/destructuringParameterProperties5.types @@ -6,7 +6,7 @@ type ObjType1 = { x: number; y: string; z: boolean } >z : boolean type TupleType1 = [ObjType1, number, string] ->TupleType1 : [ObjType1, number, string] +>TupleType1 : TupleType1 class C1 { >C1 : C1 diff --git a/tests/baselines/reference/directDependenceBetweenTypeAliases.errors.txt b/tests/baselines/reference/directDependenceBetweenTypeAliases.errors.txt index 68ea92f8fb5..d3960267177 100644 --- a/tests/baselines/reference/directDependenceBetweenTypeAliases.errors.txt +++ b/tests/baselines/reference/directDependenceBetweenTypeAliases.errors.txt @@ -4,18 +4,9 @@ tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts( tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(7,6): error TS2456: Type alias 'T0_3' circularly references itself. tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(11,6): error TS2456: Type alias 'T1' circularly references itself. tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(14,6): error TS2456: Type alias 'T2' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(16,6): error TS2456: Type alias 'T2_1' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(19,6): error TS2456: Type alias 'T3' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(22,6): error TS2456: Type alias 'T4' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(25,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(26,6): error TS2456: Type alias 'T5' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(29,6): error TS2456: Type alias 'T6' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(30,6): error TS2456: Type alias 'T7' circularly references itself. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(31,5): error TS2502: 'yy' is referenced directly or indirectly in its own type annotation. -tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(32,6): error TS2456: Type alias 'T8' circularly references itself. -==== tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts (15 errors) ==== +==== tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts (6 errors) ==== // It is an error for the type specified in a type alias to depend on that type alias // A type alias directly depends on the type it aliases. @@ -44,40 +35,22 @@ tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts( !!! error TS2456: Type alias 'T2' circularly references itself. class C {} type T2_1 = T2_1[] | number - ~~~~ -!!! error TS2456: Type alias 'T2_1' circularly references itself. // An array type directly depends on its element type. type T3 = T3[] - ~~ -!!! error TS2456: Type alias 'T3' circularly references itself. // A tuple type directly depends on each of its element types. type T4 = [number, T4] - ~~ -!!! error TS2456: Type alias 'T4' circularly references itself. // A type query directly depends on the type of the referenced entity. var x: T5[] = [] - ~ -!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation. type T5 = typeof x - ~~ -!!! error TS2456: Type alias 'T5' circularly references itself. class C1 {} type T6 = T7 | number - ~~ -!!! error TS2456: Type alias 'T6' circularly references itself. type T7 = typeof yy - ~~ -!!! error TS2456: Type alias 'T7' circularly references itself. var yy: [string, T8[]]; - ~~ -!!! error TS2502: 'yy' is referenced directly or indirectly in its own type annotation. type T8 = C - ~~ -!!! error TS2456: Type alias 'T8' circularly references itself. // legal cases type T9 = () => T9 diff --git a/tests/baselines/reference/directDependenceBetweenTypeAliases.types b/tests/baselines/reference/directDependenceBetweenTypeAliases.types index 3363b20b851..431b65eea8c 100644 --- a/tests/baselines/reference/directDependenceBetweenTypeAliases.types +++ b/tests/baselines/reference/directDependenceBetweenTypeAliases.types @@ -27,40 +27,40 @@ class C {} >C : C type T2_1 = T2_1[] | number ->T2_1 : any +>T2_1 : T2_1 // An array type directly depends on its element type. type T3 = T3[] ->T3 : any +>T3 : T3 // A tuple type directly depends on each of its element types. type T4 = [number, T4] ->T4 : any +>T4 : T4 // A type query directly depends on the type of the referenced entity. var x: T5[] = [] ->x : any +>x : any[][][][][][][][][][][] >[] : undefined[] type T5 = typeof x ->T5 : any ->x : any +>T5 : any[][][][][][][][][][][] +>x : any[][][][][][][][][][][] class C1 {} >C1 : C1 type T6 = T7 | number ->T6 : any +>T6 : T6 type T7 = typeof yy ->T7 : any ->yy : any +>T7 : [string, C[]] +>yy : [string, C[]] var yy: [string, T8[]]; ->yy : any +>yy : [string, C[]] type T8 = C ->T8 : any +>T8 : C // legal cases type T9 = () => T9 @@ -72,17 +72,17 @@ type T10 = { x: T10 } | { new(v: T10): string } >v : T10 type T11 = T12[] ->T11 : [{ x: [any, string][]; }, string][] +>T11 : T11 type T12 = [T13, string] ->T12 : [{ x: [any, string][]; }, string] +>T12 : T12 type T13 = typeof zz ->T13 : { x: [any, string][]; } ->zz : { x: [any, string][]; } +>T13 : { x: T11; } +>zz : { x: T11; } var zz: { x: T11 } ->zz : { x: [any, string][]; } ->x : [{ x: [any, string][]; }, string][] +>zz : { x: T11; } +>x : T11 diff --git a/tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.types b/tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.types index abdbaa84862..f3a96fba6a8 100644 --- a/tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.types +++ b/tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.types @@ -14,7 +14,7 @@ class B { } type X = [T["a"], (T | B)["a"]]; ->X : [T["a"], (B | T)["a"]] +>X : X type Y = T["a"]; >Y : T["a"] diff --git a/tests/baselines/reference/inferTypes1.types b/tests/baselines/reference/inferTypes1.types index 2696b520ae8..02fa41fe4c8 100644 --- a/tests/baselines/reference/inferTypes1.types +++ b/tests/baselines/reference/inferTypes1.types @@ -269,19 +269,19 @@ type T78 = T extends T76 ? T76 : never; >T78 : T78 type Foo = [T, U]; ->Foo : [T, U] +>Foo : Foo type Bar = T extends Foo ? Foo : never; >Bar : Bar type T90 = Bar<[string, string]>; // [string, string] ->T90 : [string, string] +>T90 : Foo type T91 = Bar<[string, "a"]>; // [string, "a"] ->T91 : [string, "a"] +>T91 : Foo type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"] ->T92 : [string, "a"] +>T92 : Foo >x : string type T93 = Bar<["a", string]>; // never @@ -371,13 +371,13 @@ const z2: string = ex.obj.nested.attr; // Repros from #21631 type A1> = [T, U]; ->A1 : [T, U] +>A1 : A1 type B1 = S extends A1 ? [T, U] : never; >B1 : B1 type A2 = [T, U]; ->A2 : [T, U] +>A2 : A2 type B2 = S extends A2 ? [T, U] : never; >B2 : B2 diff --git a/tests/baselines/reference/interfaceExtendsObjectIntersection.types b/tests/baselines/reference/interfaceExtendsObjectIntersection.types index cc166a6e57c..af638969078 100644 --- a/tests/baselines/reference/interfaceExtendsObjectIntersection.types +++ b/tests/baselines/reference/interfaceExtendsObjectIntersection.types @@ -15,10 +15,10 @@ type T4 = new () => { a: number }; >a : number type T5 = number[]; ->T5 : number[] +>T5 : T5 type T6 = [string, number]; ->T6 : [string, number] +>T6 : T6 type T7 = { [P in 'a' | 'b' | 'c']: string }; >T7 : T7 diff --git a/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.types b/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.types index 6b81e8d2f54..2fc15b53994 100644 --- a/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.types +++ b/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.types @@ -8,10 +8,10 @@ type T2 = T1 & { b: number }; >b : number type T3 = number[]; ->T3 : number[] +>T3 : T3 type T4 = [string, number]; ->T4 : [string, number] +>T4 : T4 type T5 = { [P in 'a' | 'b' | 'c']: string }; >T5 : T5 diff --git a/tests/baselines/reference/intersectionTypeWithLeadingOperator.types b/tests/baselines/reference/intersectionTypeWithLeadingOperator.types index 9961f051f7f..826da4d8c51 100644 --- a/tests/baselines/reference/intersectionTypeWithLeadingOperator.types +++ b/tests/baselines/reference/intersectionTypeWithLeadingOperator.types @@ -12,7 +12,7 @@ type B = >bar : number type C = [& { foo: 1 } & { bar: 2 }, & { foo: 3 } & { bar: 4 }]; ->C : [{ foo: 1; } & { bar: 2; }, { foo: 3; } & { bar: 4; }] +>C : C >foo : 1 >bar : 2 >foo : 3 diff --git a/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.types b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.types index dd302f40679..59292bac60f 100644 --- a/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.types +++ b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.types @@ -5,12 +5,12 @@ import * as React from 'react' >React : typeof React type Tab = [string, React.ReactNode] // [tabName, tabContent] ->Tab : [string, React.ReactNode] +>Tab : Tab >React : any interface Props { children: Tab[] ->children : [string, React.ReactNode][] +>children : Tab[] } function TabLayout(props: Props) { diff --git a/tests/baselines/reference/mapOnTupleTypes02.types b/tests/baselines/reference/mapOnTupleTypes02.types index 2bb394ec120..3f443a735cb 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.types +++ b/tests/baselines/reference/mapOnTupleTypes02.types @@ -1,15 +1,15 @@ === tests/cases/compiler/mapOnTupleTypes02.ts === export type Point = [number, number]; ->Point : [number, number] +>Point : Point export function increment(point: Point) { ->increment : (point: [number, number]) => number[] ->point : [number, number] +>increment : (point: Point) => number[] +>point : Point return point.map(d => d + 1); >point.map(d => d + 1) : number[] >point.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->point : [number, number] +>point : Point >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >d => d + 1 : (d: number) => number >d : number diff --git a/tests/baselines/reference/optionalTupleElements1.errors.txt b/tests/baselines/reference/optionalTupleElements1.errors.txt index ac9f5f244da..bb5fd2c01d8 100644 --- a/tests/baselines/reference/optionalTupleElements1.errors.txt +++ b/tests/baselines/reference/optionalTupleElements1.errors.txt @@ -1,25 +1,25 @@ tests/cases/conformance/types/tuple/optionalTupleElements1.ts(11,29): error TS1257: A required element cannot follow an optional element. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(15,5): error TS2322: Type '[number, string, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(15,5): error TS2322: Type 'T2' is not assignable to type 'T1'. Types of property '2' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'undefined' is not assignable to type 'boolean'. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(16,5): error TS2322: Type '[number, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(16,5): error TS2322: Type 'T3' is not assignable to type 'T1'. Types of property '1' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(17,5): error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(17,5): error TS2322: Type 'T4' is not assignable to type 'T1'. Types of property '0' are incompatible. Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(20,5): error TS2322: Type '[number, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, (boolean | undefined)?]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(20,5): error TS2322: Type 'T3' is not assignable to type 'T2'. Types of property '1' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(21,5): error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, (boolean | undefined)?]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(21,5): error TS2322: Type 'T4' is not assignable to type 'T2'. Types of property '0' are incompatible. Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/optionalTupleElements1.ts(25,5): error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, (string | undefined)?, (boolean | undefined)?]'. +tests/cases/conformance/types/tuple/optionalTupleElements1.ts(25,5): error TS2322: Type 'T4' is not assignable to type 'T3'. Types of property '0' are incompatible. Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. @@ -44,19 +44,19 @@ tests/cases/conformance/types/tuple/optionalTupleElements1.ts(25,5): error TS232 t1 = t1; t1 = t2; // Error ~~ -!!! error TS2322: Type '[number, string, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +!!! error TS2322: Type 'T2' is not assignable to type 'T1'. !!! error TS2322: Types of property '2' are incompatible. !!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. !!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. t1 = t3; // Error ~~ -!!! error TS2322: Type '[number, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +!!! error TS2322: Type 'T3' is not assignable to type 'T1'. !!! error TS2322: Types of property '1' are incompatible. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. t1 = t4; // Error ~~ -!!! error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, boolean]'. +!!! error TS2322: Type 'T4' is not assignable to type 'T1'. !!! error TS2322: Types of property '0' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'number'. !!! error TS2322: Type 'undefined' is not assignable to type 'number'. @@ -64,13 +64,13 @@ tests/cases/conformance/types/tuple/optionalTupleElements1.ts(25,5): error TS232 t2 = t2; t2 = t3; // Error ~~ -!!! error TS2322: Type '[number, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, (boolean | undefined)?]'. +!!! error TS2322: Type 'T3' is not assignable to type 'T2'. !!! error TS2322: Types of property '1' are incompatible. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. t2 = t4; // Error ~~ -!!! error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, string, (boolean | undefined)?]'. +!!! error TS2322: Type 'T4' is not assignable to type 'T2'. !!! error TS2322: Types of property '0' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'number'. !!! error TS2322: Type 'undefined' is not assignable to type 'number'. @@ -79,7 +79,7 @@ tests/cases/conformance/types/tuple/optionalTupleElements1.ts(25,5): error TS232 t3 = t3; t3 = t4; // Error ~~ -!!! error TS2322: Type '[(number | undefined)?, (string | undefined)?, (boolean | undefined)?]' is not assignable to type '[number, (string | undefined)?, (boolean | undefined)?]'. +!!! error TS2322: Type 'T4' is not assignable to type 'T3'. !!! error TS2322: Types of property '0' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'number'. !!! error TS2322: Type 'undefined' is not assignable to type 'number'. diff --git a/tests/baselines/reference/optionalTupleElements1.types b/tests/baselines/reference/optionalTupleElements1.types index 630a54df517..b784bf72e58 100644 --- a/tests/baselines/reference/optionalTupleElements1.types +++ b/tests/baselines/reference/optionalTupleElements1.types @@ -1,15 +1,15 @@ === tests/cases/conformance/types/tuple/optionalTupleElements1.ts === type T1 = [number, string, boolean]; ->T1 : [number, string, boolean] +>T1 : T1 type T2 = [number, string, boolean?]; ->T2 : [number, string, (boolean | undefined)?] +>T2 : T2 type T3 = [number, string?, boolean?]; ->T3 : [number, (string | undefined)?, (boolean | undefined)?] +>T3 : T3 type T4 = [number?, string?, boolean?]; ->T4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>T4 : T4 type L1 = T1["length"]; >L1 : 3 @@ -24,122 +24,122 @@ type L4 = T4["length"]; >L4 : 0 | 3 | 2 | 1 type T5 = [number, string?, boolean]; // Error ->T5 : [number, string | undefined, boolean] +>T5 : T5 function f1(t1: T1, t2: T2, t3: T3, t4: T4) { ->f1 : (t1: [number, string, boolean], t2: [number, string, (boolean | undefined)?], t3: [number, (string | undefined)?, (boolean | undefined)?], t4: [(number | undefined)?, (string | undefined)?, (boolean | undefined)?]) => void ->t1 : [number, string, boolean] ->t2 : [number, string, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>f1 : (t1: T1, t2: T2, t3: T3, t4: T4) => void +>t1 : T1 +>t2 : T2 +>t3 : T3 +>t4 : T4 t1 = t1; ->t1 = t1 : [number, string, boolean] ->t1 : [number, string, boolean] ->t1 : [number, string, boolean] +>t1 = t1 : T1 +>t1 : T1 +>t1 : T1 t1 = t2; // Error ->t1 = t2 : [number, string, (boolean | undefined)?] ->t1 : [number, string, boolean] ->t2 : [number, string, (boolean | undefined)?] +>t1 = t2 : T2 +>t1 : T1 +>t2 : T2 t1 = t3; // Error ->t1 = t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t1 : [number, string, boolean] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t1 = t3 : T3 +>t1 : T1 +>t3 : T3 t1 = t4; // Error ->t1 = t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t1 : [number, string, boolean] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t1 = t4 : T4 +>t1 : T1 +>t4 : T4 t2 = t1; ->t2 = t1 : [number, string, boolean] ->t2 : [number, string, (boolean | undefined)?] ->t1 : [number, string, boolean] +>t2 = t1 : T1 +>t2 : T2 +>t1 : T1 t2 = t2; ->t2 = t2 : [number, string, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] +>t2 = t2 : T2 +>t2 : T2 +>t2 : T2 t2 = t3; // Error ->t2 = t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t2 = t3 : T3 +>t2 : T2 +>t3 : T3 t2 = t4; // Error ->t2 = t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t2 = t4 : T4 +>t2 : T2 +>t4 : T4 t3 = t1; ->t3 = t1 : [number, string, boolean] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t1 : [number, string, boolean] +>t3 = t1 : T1 +>t3 : T3 +>t1 : T1 t3 = t2; ->t3 = t2 : [number, string, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] +>t3 = t2 : T2 +>t3 : T3 +>t2 : T2 t3 = t3; ->t3 = t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t3 = t3 : T3 +>t3 : T3 +>t3 : T3 t3 = t4; // Error ->t3 = t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t3 = t4 : T4 +>t3 : T3 +>t4 : T4 t4 = t1; ->t4 = t1 : [number, string, boolean] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t1 : [number, string, boolean] +>t4 = t1 : T1 +>t4 : T4 +>t1 : T1 t4 = t2; ->t4 = t2 : [number, string, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t2 : [number, string, (boolean | undefined)?] +>t4 = t2 : T2 +>t4 : T4 +>t2 : T2 t4 = t3; ->t4 = t3 : [number, (string | undefined)?, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t4 = t3 : T3 +>t4 : T4 +>t3 : T3 t4 = t4; ->t4 = t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 = t4 : T4 +>t4 : T4 +>t4 : T4 } let t2: T2; ->t2 : [number, string, (boolean | undefined)?] +>t2 : T2 let t3: T3; ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t3 : T3 let t4: T4; ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 t2 = [42, "hello"]; >t2 = [42, "hello"] : [number, string] ->t2 : [number, string, (boolean | undefined)?] +>t2 : T2 >[42, "hello"] : [number, string] >42 : 42 >"hello" : "hello" t3 = [42, "hello"]; >t3 = [42, "hello"] : [number, string] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t3 : T3 >[42, "hello"] : [number, string] >42 : 42 >"hello" : "hello" t3 = [42,,true] >t3 = [42,,true] : [number, undefined, true] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t3 : T3 >[42,,true] : [number, undefined, true] >42 : 42 > : undefined @@ -147,20 +147,20 @@ t3 = [42,,true] t3 = [42]; >t3 = [42] : [number] ->t3 : [number, (string | undefined)?, (boolean | undefined)?] +>t3 : T3 >[42] : [number] >42 : 42 t4 = [42, "hello"]; >t4 = [42, "hello"] : [number, string] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 >[42, "hello"] : [number, string] >42 : 42 >"hello" : "hello" t4 = [42,,true]; >t4 = [42,,true] : [number, undefined, true] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 >[42,,true] : [number, undefined, true] >42 : 42 > : undefined @@ -168,7 +168,7 @@ t4 = [42,,true]; t4 = [,"hello", true]; >t4 = [,"hello", true] : [undefined, string, true] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 >[,"hello", true] : [undefined, string, true] > : undefined >"hello" : "hello" @@ -176,7 +176,7 @@ t4 = [,"hello", true]; t4 = [,,true]; >t4 = [,,true] : [undefined, undefined, true] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 >[,,true] : [undefined, undefined, true] > : undefined > : undefined @@ -184,6 +184,6 @@ t4 = [,,true]; t4 = []; >t4 = [] : [] ->t4 : [(number | undefined)?, (string | undefined)?, (boolean | undefined)?] +>t4 : T4 >[] : [] diff --git a/tests/baselines/reference/readonlyArraysAndTuples.types b/tests/baselines/reference/readonlyArraysAndTuples.types index 5075319ef95..2d4086a0193 100644 --- a/tests/baselines/reference/readonlyArraysAndTuples.types +++ b/tests/baselines/reference/readonlyArraysAndTuples.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts === type T10 = string[]; ->T10 : string[] +>T10 : T10 type T11 = Array; >T11 : string[] @@ -12,7 +12,7 @@ type T13 = ReadonlyArray; >T13 : readonly string[] type T20 = [number, number]; ->T20 : [number, number] +>T20 : T20 type T21 = readonly [number, number]; >T21 : readonly [number, number] diff --git a/tests/baselines/reference/readonlyArraysAndTuples2.types b/tests/baselines/reference/readonlyArraysAndTuples2.types index 9e49820fdbe..7b8c7124806 100644 --- a/tests/baselines/reference/readonlyArraysAndTuples2.types +++ b/tests/baselines/reference/readonlyArraysAndTuples2.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts === type T10 = string[]; ->T10 : string[] +>T10 : T10 type T11 = Array; >T11 : string[] @@ -12,7 +12,7 @@ type T13 = ReadonlyArray; >T13 : readonly string[] type T20 = [number, number]; ->T20 : [number, number] +>T20 : T20 type T21 = readonly [number, number]; >T21 : readonly [number, number] diff --git a/tests/baselines/reference/recursiveMappedTypes.types b/tests/baselines/reference/recursiveMappedTypes.types index 34cfd2d6100..02a555cdcb1 100644 --- a/tests/baselines/reference/recursiveMappedTypes.types +++ b/tests/baselines/reference/recursiveMappedTypes.types @@ -25,10 +25,10 @@ export type Circular = {[P in keyof T]: Circular}; >Circular : Circular type tup = [number, number, number, number]; ->tup : [number, number, number, number] +>tup : tup function foo(arg: Circular): tup { ->foo : (arg: any) => [number, number, number, number] +>foo : (arg: any) => tup >arg : any return arg; @@ -44,10 +44,10 @@ type DeepMap = { }; type tpl = [string, [string, [string]]]; ->tpl : [string, [string, [string]]] +>tpl : tpl type arr = string[][]; ->arr : string[][] +>arr : arr type t1 = DeepMap; // [number, [number, [number]]] >t1 : [number, [number, [number]]] diff --git a/tests/baselines/reference/recursiveResolveTypeMembers.errors.txt b/tests/baselines/reference/recursiveResolveTypeMembers.errors.txt index ad5fe6dc1ae..7bb5c554984 100644 --- a/tests/baselines/reference/recursiveResolveTypeMembers.errors.txt +++ b/tests/baselines/reference/recursiveResolveTypeMembers.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/recursiveResolveTypeMembers.ts(4,49): error TS2577: Return type annotation circularly references itself. +tests/cases/compiler/recursiveResolveTypeMembers.ts(4,49): error TS2589: Type instantiation is excessively deep and possibly infinite. tests/cases/compiler/recursiveResolveTypeMembers.ts(4,58): error TS2304: Cannot find name 'H'. tests/cases/compiler/recursiveResolveTypeMembers.ts(4,62): error TS2574: A rest element type must be an array type. tests/cases/compiler/recursiveResolveTypeMembers.ts(4,79): error TS2304: Cannot find name 'R'. @@ -10,7 +10,7 @@ tests/cases/compiler/recursiveResolveTypeMembers.ts(4,79): error TS2304: Cannot type PromisedTuple void> = U extends (h: infer H, ...args: infer R) => [Promise, ...PromisedTuple] ? [] : [] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2577: Return type annotation circularly references itself. +!!! error TS2589: Type instantiation is excessively deep and possibly infinite. ~ !!! error TS2304: Cannot find name 'H'. ~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/recursiveTypesWithTypeof.errors.txt b/tests/baselines/reference/recursiveTypesWithTypeof.errors.txt index 0604e38bd94..2807613c3d9 100644 --- a/tests/baselines/reference/recursiveTypesWithTypeof.errors.txt +++ b/tests/baselines/reference/recursiveTypesWithTypeof.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithType tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(6,5): error TS2502: 'e' is referenced directly or indirectly in its own type annotation. tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(10,5): error TS2502: 'f' is referenced directly or indirectly in its own type annotation. tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(12,5): error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. -tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(14,5): error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. +tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(15,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'f3' must be of type 'Foo[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]', but here has type 'any'. tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts(51,5): error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. @@ -32,9 +32,10 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithType !!! error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. var f2: any; var f3: Foo[]; - ~~ -!!! error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. var f3: any; + ~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'f3' must be of type 'Foo[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]', but here has type 'any'. +!!! related TS6203 tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts:14:5: 'f3' was also declared here. // None of these declarations should have any errors! // Truly recursive types diff --git a/tests/baselines/reference/recursiveTypesWithTypeof.types b/tests/baselines/reference/recursiveTypesWithTypeof.types index 5625e7919cd..1a527bfa470 100644 --- a/tests/baselines/reference/recursiveTypesWithTypeof.types +++ b/tests/baselines/reference/recursiveTypesWithTypeof.types @@ -37,11 +37,11 @@ var f2: any; >f2 : any var f3: Foo[]; ->f3 : any ->f3 : any +>f3 : Foo[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[] +>f3 : Foo[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[] var f3: any; ->f3 : any +>f3 : Foo[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[] // None of these declarations should have any errors! // Truly recursive types diff --git a/tests/baselines/reference/restTupleElements1.types b/tests/baselines/reference/restTupleElements1.types index ffa20bf503e..88c98395f21 100644 --- a/tests/baselines/reference/restTupleElements1.types +++ b/tests/baselines/reference/restTupleElements1.types @@ -1,42 +1,42 @@ === tests/cases/conformance/types/tuple/restTupleElements1.ts === type T00 = [string?]; ->T00 : [(string | undefined)?] +>T00 : T00 type T01 = [string, string?]; ->T01 : [string, (string | undefined)?] +>T01 : T01 type T02 = [string?, string]; // Error ->T02 : [string | undefined, string] +>T02 : T02 type T03 = [...string[]]; ->T03 : string[] +>T03 : T03 type T04 = [...[...string[]]]; ->T04 : string[] +>T04 : T04 type T05 = [...[...[...string[]]]]; ->T05 : string[] +>T05 : T05 type T06 = [string, ...string[]]; ->T06 : [string, ...string[]] +>T06 : T06 type T07 = [...string[], string]; // Error ->T07 : [string[], string] +>T07 : T07 type T08 = [...string]; // Error ->T08 : string[] +>T08 : T08 type T09 = [...string?]; // Error ->T09 : (string | null)[] +>T09 : T09 type T10 = [string, ...[...string[]]]; ->T10 : [string, ...string[]] +>T10 : T10 type T11 = [string, ...[...[...string[]]]]; ->T11 : [string, ...string[]] +>T11 : T11 type T15 = [boolean, number, ...string[]]; ->T15 : [boolean, number, ...string[]] +>T15 : T15 type L15 = T15["length"]; // number >L15 : number @@ -101,7 +101,7 @@ assign<[number, ...number[]], [number, number, number, string]>(); // Error >assign : () => void type T20 = [number, string, ...boolean[]]; ->T20 : [number, string, ...boolean[]] +>T20 : T20 type T21 = T20[0]; >T21 : number @@ -128,7 +128,7 @@ type T28 = T20[number]; >T28 : string | number | boolean declare const t: T20; ->t : [number, string, ...boolean[]] +>t : T20 declare const x: number; >x : number @@ -136,31 +136,31 @@ declare const x: number; let e0 = t[0]; // number >e0 : number >t[0] : number ->t : [number, string, ...boolean[]] +>t : T20 >0 : 0 let e1 = t[1]; // string >e1 : string >t[1] : string ->t : [number, string, ...boolean[]] +>t : T20 >1 : 1 let e2 = t[2]; // boolean >e2 : boolean >t[2] : boolean ->t : [number, string, ...boolean[]] +>t : T20 >2 : 2 let e3 = t[3]; // boolean >e3 : boolean >t[3] : boolean ->t : [number, string, ...boolean[]] +>t : T20 >3 : 3 let ex = t[x]; // number | string | boolean >ex : string | number | boolean >t[x] : string | number | boolean ->t : [number, string, ...boolean[]] +>t : T20 >x : number declare function f0(x: [T, ...U[]]): [T, U]; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types index 8ea11e087f8..eff8a930963 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function getRobot() { ->getRobot : () => [number, string, string] +>getRobot : () => Robot return robotA; ->robotA : [number, string, string] +>robotA : Robot } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -35,7 +35,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -43,16 +43,16 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function getMultiRobot() { ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot : () => MultiSkilledRobot return multiRobotA; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot } for (let [, nameA] = robotA, i = 0; i < 1; i++) { > : undefined >nameA : string ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -71,8 +71,8 @@ for (let [, nameA] = robotA, i = 0; i < 1; i++) { for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { > : undefined >nameA : string ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -114,7 +114,7 @@ for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) > : undefined >primarySkillA : string >secondarySkillA : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -134,8 +134,8 @@ for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i > : undefined >primarySkillA : string >secondarySkillA : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -178,7 +178,7 @@ for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging for (let [numberB] = robotA, i = 0; i < 1; i++) { >numberB : number ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -196,8 +196,8 @@ for (let [numberB] = robotA, i = 0; i < 1; i++) { } for (let [numberB] = getRobot(), i = 0; i < 1; i++) { >numberB : number ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -236,7 +236,7 @@ for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { >nameB : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -254,8 +254,8 @@ for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { } for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { >nameB : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -298,7 +298,7 @@ for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { >numberA2 : number >nameA2 : string >skillA2 : string ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -318,8 +318,8 @@ for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { >numberA2 : number >nameA2 : string >skillA2 : string ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -362,7 +362,7 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; >nameMA : string >primarySkillA : string >secondarySkillA : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -382,8 +382,8 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i >nameMA : string >primarySkillA : string >secondarySkillA : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -427,7 +427,7 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", " for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { >numberA3 : number >robotAInfo : [string, string] ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -446,8 +446,8 @@ for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { >numberA3 : number >robotAInfo : [string, string] ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -487,7 +487,7 @@ for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i } for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { >multiRobotAInfo : [string, [string, string]] ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -505,8 +505,8 @@ for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { } for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { >multiRobotAInfo : [string, [string, string]] ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types index 3f198ebc80f..bfa1757d616 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function getRobot() { ->getRobot : () => [number, string, string] +>getRobot : () => Robot return robotA; ->robotA : [number, string, string] +>robotA : Robot } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -35,7 +35,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -43,10 +43,10 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function getMultiRobot() { ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot : () => MultiSkilledRobot return multiRobotA; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot } let nameA: string, primarySkillA: string, secondarySkillA: string; @@ -74,11 +74,11 @@ let i: number; for ([, nameA] = robotA, i = 0; i < 1; i++) { >[, nameA] = robotA, i = 0 : 0 ->[, nameA] = robotA : [number, string, string] +>[, nameA] = robotA : Robot >[, nameA] : [undefined, string] > : undefined >nameA : string ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -97,12 +97,12 @@ for ([, nameA] = robotA, i = 0; i < 1; i++) { } for ([, nameA] = getRobot(), i = 0; i < 1; i++) { >[, nameA] = getRobot(), i = 0 : 0 ->[, nameA] = getRobot() : [number, string, string] +>[, nameA] = getRobot() : Robot >[, nameA] : [undefined, string] > : undefined >nameA : string ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -147,13 +147,13 @@ for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { >[, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 : 0 ->[, [primarySkillA, secondarySkillA]] = multiRobotA : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] = multiRobotA : MultiSkilledRobot >[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] > : undefined >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -172,14 +172,14 @@ for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { } for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { >[, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 : 0 ->[, [primarySkillA, secondarySkillA]] = getMultiRobot() : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] = getMultiRobot() : MultiSkilledRobot >[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] > : undefined >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -228,10 +228,10 @@ for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], for ([numberB] = robotA, i = 0; i < 1; i++) { >[numberB] = robotA, i = 0 : 0 ->[numberB] = robotA : [number, string, string] +>[numberB] = robotA : Robot >[numberB] : [number] >numberB : number ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -250,11 +250,11 @@ for ([numberB] = robotA, i = 0; i < 1; i++) { } for ([numberB] = getRobot(), i = 0; i < 1; i++) { >[numberB] = getRobot(), i = 0 : 0 ->[numberB] = getRobot() : [number, string, string] +>[numberB] = getRobot() : Robot >[numberB] : [number] >numberB : number ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -298,10 +298,10 @@ for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for ([nameB] = multiRobotA, i = 0; i < 1; i++) { >[nameB] = multiRobotA, i = 0 : 0 ->[nameB] = multiRobotA : [string, [string, string]] +>[nameB] = multiRobotA : MultiSkilledRobot >[nameB] : [string] >nameB : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -320,11 +320,11 @@ for ([nameB] = multiRobotA, i = 0; i < 1; i++) { } for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { >[nameB] = getMultiRobot(), i = 0 : 0 ->[nameB] = getMultiRobot() : [string, [string, string]] +>[nameB] = getMultiRobot() : MultiSkilledRobot >[nameB] : [string] >nameB : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -370,12 +370,12 @@ for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { >[numberA2, nameA2, skillA2] = robotA, i = 0 : 0 ->[numberA2, nameA2, skillA2] = robotA : [number, string, string] +>[numberA2, nameA2, skillA2] = robotA : Robot >[numberA2, nameA2, skillA2] : [number, string, string] >numberA2 : number >nameA2 : string >skillA2 : string ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -394,13 +394,13 @@ for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { } for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { >[numberA2, nameA2, skillA2] = getRobot(), i = 0 : 0 ->[numberA2, nameA2, skillA2] = getRobot() : [number, string, string] +>[numberA2, nameA2, skillA2] = getRobot() : Robot >[numberA2, nameA2, skillA2] : [number, string, string] >numberA2 : number >nameA2 : string >skillA2 : string ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -446,13 +446,13 @@ for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++ } for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { >[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 : 0 ->[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA : MultiSkilledRobot >[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] >nameMA : string >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -471,14 +471,14 @@ for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++ } for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { >[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 : 0 ->[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() : MultiSkilledRobot >[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] >nameMA : string >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -527,12 +527,12 @@ for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edgi for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { >[numberA3, ...robotAInfo] = robotA, i = 0 : 0 ->[numberA3, ...robotAInfo] = robotA : [number, string, string] +>[numberA3, ...robotAInfo] = robotA : Robot >[numberA3, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -551,13 +551,13 @@ for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { } for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { >[numberA3, ...robotAInfo] = getRobot(), i = 0 : 0 ->[numberA3, ...robotAInfo] = getRobot() : [number, string, string] +>[numberA3, ...robotAInfo] = getRobot() : Robot >[numberA3, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -576,12 +576,12 @@ for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { } for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 : 0 ->[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] : Robot >[numberA3, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -604,11 +604,11 @@ for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1 } for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { >[...multiRobotAInfo] = multiRobotA, i = 0 : 0 ->[...multiRobotAInfo] = multiRobotA : [string, [string, string]] +>[...multiRobotAInfo] = multiRobotA : MultiSkilledRobot >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -627,12 +627,12 @@ for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { } for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { >[...multiRobotAInfo] = getMultiRobot(), i = 0 : 0 ->[...multiRobotAInfo] = getMultiRobot() : [string, [string, string]] +>[...multiRobotAInfo] = getMultiRobot() : MultiSkilledRobot >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -651,11 +651,11 @@ for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { } for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0 : 0 ->[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : MultiSkilledRobot >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types index ee16f28a9d5..2dab0c1cd6b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, string[]]; ->MultiSkilledRobot : [string, string[]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function getRobot() { ->getRobot : () => [number, string, string] +>getRobot : () => Robot return robotA; ->robotA : [number, string, string] +>robotA : Robot } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, string[]] >"mower" : "mower" >["mowing", ""] : string[] @@ -35,7 +35,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, string[]] >"trimmer" : "trimmer" >["trimming", "edging"] : string[] @@ -43,17 +43,17 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function getMultiRobot() { ->getMultiRobot : () => [string, string[]] +>getMultiRobot : () => MultiSkilledRobot return multiRobotA; ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot } for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { > : undefined >nameA : string >"name" : "name" ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -73,8 +73,8 @@ for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { > : undefined >nameA : string >"name" : "name" ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -128,7 +128,7 @@ for (let [, [ >["none", "none"] : [string, string] >"none" : "none" >"none" : "none" ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -159,8 +159,8 @@ for (let [, [ >["none", "none"] : [string, string] >"none" : "none" >"none" : "none" ->getMultiRobot() : [string, string[]] ->getMultiRobot : () => [string, string[]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -216,7 +216,7 @@ for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { >numberB : number >-1 : -1 >1 : 1 ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -236,8 +236,8 @@ for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { >numberB : number >-1 : -1 >1 : 1 ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -279,7 +279,7 @@ for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { >nameB : string >"name" : "name" ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -298,8 +298,8 @@ for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { >nameB : string >"name" : "name" ->getMultiRobot() : [string, string[]] ->getMultiRobot : () => [string, string[]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -347,7 +347,7 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i >"name" : "name" >skillA2 : string >"skill" : "skill" ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -371,8 +371,8 @@ for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 >"name" : "name" >skillA2 : string >"skill" : "skill" ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean @@ -435,7 +435,7 @@ for (let >"none" : "none" ] = multiRobotA, i = 0; i < 1; i++) { ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -470,8 +470,8 @@ for (let [nameMA = "noName", >"none" : "none" ] = getMultiRobot(), i = 0; i < 1; i++) { ->getMultiRobot() : [string, string[]] ->getMultiRobot : () => [string, string[]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -532,7 +532,7 @@ for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->robotA : [number, string, string] +>robotA : Robot >i : number >0 : 0 >i < 1 : boolean @@ -553,8 +553,8 @@ for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i : number >0 : 0 >i < 1 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types index 9175ee68dca..aa06efe3965 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function getRobot() { ->getRobot : () => [number, string, string] +>getRobot : () => Robot return robotA; ->robotA : [number, string, string] +>robotA : Robot } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -35,7 +35,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -43,10 +43,10 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function getMultiRobot() { ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot : () => MultiSkilledRobot return multiRobotA; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot } let nameA: string, primarySkillA: string, secondarySkillA: string; @@ -74,13 +74,13 @@ let i: number; for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { >[, nameA = "name"] = robotA, i = 0 : 0 ->[, nameA = "name"] = robotA : [number, string, string] +>[, nameA = "name"] = robotA : Robot >[, nameA = "name"] : [undefined, string] > : undefined >nameA = "name" : "name" >nameA : string >"name" : "name" ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -99,14 +99,14 @@ for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { } for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { >[, nameA = "name"] = getRobot(), i = 0 : 0 ->[, nameA = "name"] = getRobot() : [number, string, string] +>[, nameA = "name"] = getRobot() : Robot >[, nameA = "name"] : [undefined, string] > : undefined >nameA = "name" : "name" >nameA : string >"name" : "name" ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -153,7 +153,7 @@ for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for ([, [ >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA, i = 0 : 0 ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA : [string, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA : MultiSkilledRobot >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] > : undefined >[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] @@ -173,7 +173,7 @@ for ([, [ >["none", "none"] : [string, string] >"none" : "none" >"none" : "none" ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -192,7 +192,7 @@ for ([, [ } for ([, [ >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot(), i = 0 : 0 ->[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot() : MultiSkilledRobot >[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] > : undefined >[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] @@ -212,8 +212,8 @@ for ([, [ >["none", "none"] : [string, string] >"none" : "none" >"none" : "none" ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -276,13 +276,13 @@ for ([, [ for ([numberB = -1] = robotA, i = 0; i < 1; i++) { >[numberB = -1] = robotA, i = 0 : 0 ->[numberB = -1] = robotA : [number, string, string] +>[numberB = -1] = robotA : Robot >[numberB = -1] : [number] >numberB = -1 : -1 >numberB : number >-1 : -1 >1 : 1 ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -301,14 +301,14 @@ for ([numberB = -1] = robotA, i = 0; i < 1; i++) { } for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { >[numberB = -1] = getRobot(), i = 0 : 0 ->[numberB = -1] = getRobot() : [number, string, string] +>[numberB = -1] = getRobot() : Robot >[numberB = -1] : [number] >numberB = -1 : -1 >numberB : number >-1 : -1 >1 : 1 ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -355,12 +355,12 @@ for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { } for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { >[nameB = "name"] = multiRobotA, i = 0 : 0 ->[nameB = "name"] = multiRobotA : [string, [string, string]] +>[nameB = "name"] = multiRobotA : MultiSkilledRobot >[nameB = "name"] : [string] >nameB = "name" : "name" >nameB : string >"name" : "name" ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -379,13 +379,13 @@ for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { } for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { >[nameB = "name"] = getMultiRobot(), i = 0 : 0 ->[nameB = "name"] = getMultiRobot() : [string, [string, string]] +>[nameB = "name"] = getMultiRobot() : MultiSkilledRobot >[nameB = "name"] : [string] >nameB = "name" : "name" >nameB : string >"name" : "name" ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -433,7 +433,7 @@ for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0 : 0 ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA : Robot >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] >numberA2 = -1 : -1 >numberA2 : number @@ -445,7 +445,7 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; >skillA2 = "skill" : "skill" >skillA2 : string >"skill" : "skill" ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -464,7 +464,7 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; } for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 : 0 ->[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() : Robot >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] >numberA2 = -1 : -1 >numberA2 : number @@ -476,8 +476,8 @@ for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i >skillA2 = "skill" : "skill" >skillA2 : string >"skill" : "skill" ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -548,7 +548,7 @@ for (let >"none" : "none" ] = multiRobotA, i = 0; i < 1; i++) { ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >i : number >0 : 0 >i < 1 : boolean @@ -566,7 +566,7 @@ for (let } for ([nameMA = "noName", >[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot(), i = 0 : 0 ->[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot() : MultiSkilledRobot >[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : [string, [string, string]] >nameMA = "noName" : "noName" >nameMA : string @@ -592,8 +592,8 @@ for ([nameMA = "noName", >"none" : "none" ] = getMultiRobot(), i = 0; i < 1; i++) { ->getMultiRobot() : [string, [string, string]] ->getMultiRobot : () => [string, [string, string]] +>getMultiRobot() : MultiSkilledRobot +>getMultiRobot : () => MultiSkilledRobot >i = 0 : 0 >i : number >0 : 0 @@ -662,7 +662,7 @@ for ([nameMA = "noName", for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { >[numberA3 = -1, ...robotAInfo] = robotA, i = 0 : 0 ->[numberA3 = -1, ...robotAInfo] = robotA : [number, string, string] +>[numberA3 = -1, ...robotAInfo] = robotA : Robot >[numberA3 = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 = -1 : -1 >numberA3 : number @@ -670,7 +670,7 @@ for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robotA : [number, string, string] +>robotA : Robot >i = 0 : 0 >i : number >0 : 0 @@ -689,7 +689,7 @@ for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { } for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { >[numberA3 = -1, ...robotAInfo] = getRobot(), i = 0 : 0 ->[numberA3 = -1, ...robotAInfo] = getRobot() : [number, string, string] +>[numberA3 = -1, ...robotAInfo] = getRobot() : Robot >[numberA3 = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 = -1 : -1 >numberA3 : number @@ -697,8 +697,8 @@ for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobot() : [number, string, string] ->getRobot : () => [number, string, string] +>getRobot() : Robot +>getRobot : () => Robot >i = 0 : 0 >i : number >0 : 0 @@ -717,7 +717,7 @@ for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { } for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { >[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 : 0 ->[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : Robot >[numberA3 = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberA3 = -1 : -1 >numberA3 : number @@ -725,7 +725,7 @@ for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types index 57fa951a2c7..f38bc8330ef 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types @@ -7,40 +7,40 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" let robots = [robotA, robotB]; ->robots : [number, string, string][] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>robots : Robot[] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot function getRobots() { ->getRobots : () => [number, string, string][] +>getRobots : () => Robot[] return robots; ->robots : [number, string, string][] +>robots : Robot[] } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -48,7 +48,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -56,22 +56,22 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; ->multiRobots : [string, [string, string]][] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>multiRobots : MultiSkilledRobot[] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot function getMultiRobots() { ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots : () => MultiSkilledRobot[] return multiRobots; ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] } for (let [, nameA] of robots) { > : undefined >nameA : string ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA); >console.log(nameA) : void @@ -83,8 +83,8 @@ for (let [, nameA] of robots) { for (let [, nameA] of getRobots()) { > : undefined >nameA : string ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA); >console.log(nameA) : void @@ -96,9 +96,9 @@ for (let [, nameA] of getRobots()) { for (let [, nameA] of [robotA, robotB]) { > : undefined >nameA : string ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA); >console.log(nameA) : void @@ -111,7 +111,7 @@ for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { > : undefined >primarySkillA : string >secondarySkillA : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -124,8 +124,8 @@ for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { > : undefined >primarySkillA : string >secondarySkillA : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -138,9 +138,9 @@ for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { > : undefined >primarySkillA : string >secondarySkillA : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(primarySkillA); >console.log(primarySkillA) : void @@ -152,7 +152,7 @@ for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { for (let [numberB] of robots) { >numberB : number ->robots : [number, string, string][] +>robots : Robot[] console.log(numberB); >console.log(numberB) : void @@ -163,8 +163,8 @@ for (let [numberB] of robots) { } for (let [numberB] of getRobots()) { >numberB : number ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberB); >console.log(numberB) : void @@ -175,9 +175,9 @@ for (let [numberB] of getRobots()) { } for (let [numberB] of [robotA, robotB]) { >numberB : number ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberB); >console.log(numberB) : void @@ -188,7 +188,7 @@ for (let [numberB] of [robotA, robotB]) { } for (let [nameB] of multiRobots) { >nameB : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -199,8 +199,8 @@ for (let [nameB] of multiRobots) { } for (let [nameB] of getMultiRobots()) { >nameB : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -211,9 +211,9 @@ for (let [nameB] of getMultiRobots()) { } for (let [nameB] of [multiRobotA, multiRobotB]) { >nameB : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameB); >console.log(nameB) : void @@ -227,7 +227,7 @@ for (let [numberA2, nameA2, skillA2] of robots) { >numberA2 : number >nameA2 : string >skillA2 : string ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -240,8 +240,8 @@ for (let [numberA2, nameA2, skillA2] of getRobots()) { >numberA2 : number >nameA2 : string >skillA2 : string ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -254,9 +254,9 @@ for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { >numberA2 : number >nameA2 : string >skillA2 : string ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA2); >console.log(nameA2) : void @@ -269,7 +269,7 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { >nameMA : string >primarySkillA : string >secondarySkillA : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -282,8 +282,8 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { >nameMA : string >primarySkillA : string >secondarySkillA : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -296,9 +296,9 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB >nameMA : string >primarySkillA : string >secondarySkillA : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameMA); >console.log(nameMA) : void @@ -311,7 +311,7 @@ for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB for (let [numberA3, ...robotAInfo] of robots) { >numberA3 : number >robotAInfo : [string, string] ->robots : [number, string, string][] +>robots : Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -323,8 +323,8 @@ for (let [numberA3, ...robotAInfo] of robots) { for (let [numberA3, ...robotAInfo] of getRobots()) { >numberA3 : number >robotAInfo : [string, string] ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -336,9 +336,9 @@ for (let [numberA3, ...robotAInfo] of getRobots()) { for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { >numberA3 : number >robotAInfo : [string, string] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberA3); >console.log(numberA3) : void @@ -349,7 +349,7 @@ for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { } for (let [...multiRobotAInfo] of multiRobots) { >multiRobotAInfo : [string, [string, string]] ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void @@ -360,8 +360,8 @@ for (let [...multiRobotAInfo] of multiRobots) { } for (let [...multiRobotAInfo] of getMultiRobots()) { >multiRobotAInfo : [string, [string, string]] ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void @@ -372,9 +372,9 @@ for (let [...multiRobotAInfo] of getMultiRobots()) { } for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { >multiRobotAInfo : [string, [string, string]] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types index c6b57fb4f62..92797377d3a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types @@ -7,40 +7,40 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" let robots = [robotA, robotB]; ->robots : [number, string, string][] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>robots : Robot[] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot function getRobots() { ->getRobots : () => [number, string, string][] +>getRobots : () => Robot[] return robots; ->robots : [number, string, string][] +>robots : Robot[] } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -48,7 +48,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -56,16 +56,16 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; ->multiRobots : [string, [string, string]][] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>multiRobots : MultiSkilledRobot[] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot function getMultiRobots() { ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots : () => MultiSkilledRobot[] return multiRobots; ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] } let nameA: string, primarySkillA: string, secondarySkillA: string; @@ -92,7 +92,7 @@ for ([, nameA] of robots) { >[, nameA] : [undefined, string] > : undefined >nameA : string ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA); >console.log(nameA) : void @@ -105,8 +105,8 @@ for ([, nameA] of getRobots()) { >[, nameA] : [undefined, string] > : undefined >nameA : string ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA); >console.log(nameA) : void @@ -119,9 +119,9 @@ for ([, nameA] of [robotA, robotB]) { >[, nameA] : [undefined, string] > : undefined >nameA : string ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA); >console.log(nameA) : void @@ -136,7 +136,7 @@ for ([, [primarySkillA, secondarySkillA]] of multiRobots) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -151,8 +151,8 @@ for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -167,9 +167,9 @@ for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(primarySkillA); >console.log(primarySkillA) : void @@ -182,7 +182,7 @@ for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { for ([numberB] of robots) { >[numberB] : [number] >numberB : number ->robots : [number, string, string][] +>robots : Robot[] console.log(numberB); >console.log(numberB) : void @@ -194,8 +194,8 @@ for ([numberB] of robots) { for ([numberB] of getRobots()) { >[numberB] : [number] >numberB : number ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberB); >console.log(numberB) : void @@ -207,9 +207,9 @@ for ([numberB] of getRobots()) { for ([numberB] of [robotA, robotB]) { >[numberB] : [number] >numberB : number ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberB); >console.log(numberB) : void @@ -221,7 +221,7 @@ for ([numberB] of [robotA, robotB]) { for ([nameB] of multiRobots) { >[nameB] : [string] >nameB : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -233,8 +233,8 @@ for ([nameB] of multiRobots) { for ([nameB] of getMultiRobots()) { >[nameB] : [string] >nameB : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -246,9 +246,9 @@ for ([nameB] of getMultiRobots()) { for ([nameB] of [multiRobotA, multiRobotB]) { >[nameB] : [string] >nameB : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameB); >console.log(nameB) : void @@ -263,7 +263,7 @@ for ([numberA2, nameA2, skillA2] of robots) { >numberA2 : number >nameA2 : string >skillA2 : string ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -277,8 +277,8 @@ for ([numberA2, nameA2, skillA2] of getRobots()) { >numberA2 : number >nameA2 : string >skillA2 : string ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -292,9 +292,9 @@ for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { >numberA2 : number >nameA2 : string >skillA2 : string ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA2); >console.log(nameA2) : void @@ -309,7 +309,7 @@ for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -324,8 +324,8 @@ for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -340,9 +340,9 @@ for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { >[primarySkillA, secondarySkillA] : [string, string] >primarySkillA : string >secondarySkillA : string ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameMA); >console.log(nameMA) : void @@ -357,7 +357,7 @@ for ([numberA3, ...robotAInfo] of robots) { >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robots : [number, string, string][] +>robots : Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -371,8 +371,8 @@ for ([numberA3, ...robotAInfo] of getRobots()) { >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -386,9 +386,9 @@ for ([numberA3, ...robotAInfo] of [robotA, robotB]) { >numberA3 : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberA3); >console.log(numberA3) : void @@ -401,7 +401,7 @@ for ([...multiRobotAInfo] of multiRobots) { >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void @@ -414,8 +414,8 @@ for ([...multiRobotAInfo] of getMultiRobots()) { >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void @@ -428,9 +428,9 @@ for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(multiRobotAInfo); >console.log(multiRobotAInfo) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types index 34689acf920..cab4cc5ba07 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types @@ -7,40 +7,40 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" let robots = [robotA, robotB]; ->robots : [number, string, string][] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>robots : Robot[] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot function getRobots() { ->getRobots : () => [number, string, string][] +>getRobots : () => Robot[] return robots; ->robots : [number, string, string][] +>robots : Robot[] } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -48,7 +48,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -56,23 +56,23 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; ->multiRobots : [string, [string, string]][] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>multiRobots : MultiSkilledRobot[] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot function getMultiRobots() { ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots : () => MultiSkilledRobot[] return multiRobots; ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] } for (let [, nameA = "noName"] of robots) { > : undefined >nameA : string >"noName" : "noName" ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA); >console.log(nameA) : void @@ -85,8 +85,8 @@ for (let [, nameA = "noName"] of getRobots()) { > : undefined >nameA : string >"noName" : "noName" ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA); >console.log(nameA) : void @@ -99,9 +99,9 @@ for (let [, nameA = "noName"] of [robotA, robotB]) { > : undefined >nameA : string >"noName" : "noName" ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA); >console.log(nameA) : void @@ -125,7 +125,7 @@ for (let [, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -149,8 +149,8 @@ for (let [, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -174,9 +174,9 @@ for (let [, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(primarySkillA); >console.log(primarySkillA) : void @@ -190,7 +190,7 @@ for (let [numberB = -1] of robots) { >numberB : number >-1 : -1 >1 : 1 ->robots : [number, string, string][] +>robots : Robot[] console.log(numberB); >console.log(numberB) : void @@ -203,8 +203,8 @@ for (let [numberB = -1] of getRobots()) { >numberB : number >-1 : -1 >1 : 1 ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberB); >console.log(numberB) : void @@ -217,9 +217,9 @@ for (let [numberB = -1] of [robotA, robotB]) { >numberB : number >-1 : -1 >1 : 1 ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberB); >console.log(numberB) : void @@ -231,7 +231,7 @@ for (let [numberB = -1] of [robotA, robotB]) { for (let [nameB = "noName"] of multiRobots) { >nameB : string >"noName" : "noName" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -243,8 +243,8 @@ for (let [nameB = "noName"] of multiRobots) { for (let [nameB = "noName"] of getMultiRobots()) { >nameB : string >"noName" : "noName" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -256,9 +256,9 @@ for (let [nameB = "noName"] of getMultiRobots()) { for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { >nameB : string >"noName" : "noName" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameB); >console.log(nameB) : void @@ -276,7 +276,7 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { >"noName" : "noName" >skillA2 : string >"skill" : "skill" ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -293,8 +293,8 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { >"noName" : "noName" >skillA2 : string >"skill" : "skill" ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -311,9 +311,9 @@ for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robot >"noName" : "noName" >skillA2 : string >"skill" : "skill" ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA2); >console.log(nameA2) : void @@ -338,7 +338,7 @@ for (let [nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -363,8 +363,8 @@ for (let [nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -389,9 +389,9 @@ for (let [nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameMA); >console.log(nameMA) : void @@ -406,7 +406,7 @@ for (let [numberA3 = -1, ...robotAInfo] of robots) { >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->robots : [number, string, string][] +>robots : Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -420,8 +420,8 @@ for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -435,9 +435,9 @@ for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberA3); >console.log(numberA3) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types index ffca2d37c89..14e0bbaa335 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types @@ -7,40 +7,40 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot let robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" let robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" let robots = [robotA, robotB]; ->robots : [number, string, string][] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>robots : Robot[] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot function getRobots() { ->getRobots : () => [number, string, string][] +>getRobots : () => Robot[] return robots; ->robots : [number, string, string][] +>robots : Robot[] } let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -48,7 +48,7 @@ let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -56,16 +56,16 @@ let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" let multiRobots = [multiRobotA, multiRobotB]; ->multiRobots : [string, [string, string]][] ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>multiRobots : MultiSkilledRobot[] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot function getMultiRobots() { ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots : () => MultiSkilledRobot[] return multiRobots; ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] } let nameA: string, primarySkillA: string, secondarySkillA: string; @@ -94,7 +94,7 @@ for ([, nameA = "noName"] of robots) { >nameA = "noName" : "noName" >nameA : string >"noName" : "noName" ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA); >console.log(nameA) : void @@ -109,8 +109,8 @@ for ([, nameA = "noName"] of getRobots()) { >nameA = "noName" : "noName" >nameA : string >"noName" : "noName" ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA); >console.log(nameA) : void @@ -125,9 +125,9 @@ for ([, nameA = "noName"] of [robotA, robotB]) { >nameA = "noName" : "noName" >nameA : string >"noName" : "noName" ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA); >console.log(nameA) : void @@ -156,7 +156,7 @@ for ([, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -185,8 +185,8 @@ for ([, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(primarySkillA); >console.log(primarySkillA) : void @@ -215,9 +215,9 @@ for ([, [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(primarySkillA); >console.log(primarySkillA) : void @@ -233,7 +233,7 @@ for ([numberB = -1] of robots) { >numberB : number >-1 : -1 >1 : 1 ->robots : [number, string, string][] +>robots : Robot[] console.log(numberB); >console.log(numberB) : void @@ -248,8 +248,8 @@ for ([numberB = -1] of getRobots()) { >numberB : number >-1 : -1 >1 : 1 ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberB); >console.log(numberB) : void @@ -264,9 +264,9 @@ for ([numberB = -1] of [robotA, robotB]) { >numberB : number >-1 : -1 >1 : 1 ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberB); >console.log(numberB) : void @@ -280,7 +280,7 @@ for ([nameB = "noName"] of multiRobots) { >nameB = "noName" : "noName" >nameB : string >"noName" : "noName" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -294,8 +294,8 @@ for ([nameB = "noName"] of getMultiRobots()) { >nameB = "noName" : "noName" >nameB : string >"noName" : "noName" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameB); >console.log(nameB) : void @@ -309,9 +309,9 @@ for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { >nameB = "noName" : "noName" >nameB : string >"noName" : "noName" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameB); >console.log(nameB) : void @@ -333,7 +333,7 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { >skillA2 = "skill" : "skill" >skillA2 : string >"skill" : "skill" ->robots : [number, string, string][] +>robots : Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -354,8 +354,8 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { >skillA2 = "skill" : "skill" >skillA2 : string >"skill" : "skill" ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(nameA2); >console.log(nameA2) : void @@ -376,9 +376,9 @@ for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) >skillA2 = "skill" : "skill" >skillA2 : string >"skill" : "skill" ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(nameA2); >console.log(nameA2) : void @@ -409,7 +409,7 @@ for ([nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->multiRobots : [string, [string, string]][] +>multiRobots : MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -440,8 +440,8 @@ for ([nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->getMultiRobots() : [string, [string, string]][] ->getMultiRobots : () => [string, [string, string]][] +>getMultiRobots() : MultiSkilledRobot[] +>getMultiRobots : () => MultiSkilledRobot[] console.log(nameMA); >console.log(nameMA) : void @@ -472,9 +472,9 @@ for ([nameMA = "noName", [ >["skill1", "skill2"] : [string, string] >"skill1" : "skill1" >"skill2" : "skill2" ->[multiRobotA, multiRobotB] : [string, [string, string]][] ->multiRobotA : [string, [string, string]] ->multiRobotB : [string, [string, string]] +>[multiRobotA, multiRobotB] : MultiSkilledRobot[] +>multiRobotA : MultiSkilledRobot +>multiRobotB : MultiSkilledRobot console.log(nameMA); >console.log(nameMA) : void @@ -492,7 +492,7 @@ for ([numberA3 = -1, ...robotAInfo] of robots) { >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robots : [number, string, string][] +>robots : Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -509,8 +509,8 @@ for ([numberA3 = -1, ...robotAInfo] of getRobots()) { >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobots() : [number, string, string][] ->getRobots : () => [number, string, string][] +>getRobots() : Robot[] +>getRobots : () => Robot[] console.log(numberA3); >console.log(numberA3) : void @@ -527,9 +527,9 @@ for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[robotA, robotB] : [number, string, string][] ->robotA : [number, string, string] ->robotB : [number, string, string] +>[robotA, robotB] : Robot[] +>robotA : Robot +>robotB : Robot console.log(numberA3); >console.log(numberA3) : void diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types index 2758457edbe..ff955abe34b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types @@ -7,17 +7,17 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function foo1([, nameA]: Robot) { ->foo1 : ([, nameA]: [number, string, string]) => void +>foo1 : ([, nameA]: Robot) => void > : undefined >nameA : string @@ -30,7 +30,7 @@ function foo1([, nameA]: Robot) { } function foo2([numberB]: Robot) { ->foo2 : ([numberB]: [number, string, string]) => void +>foo2 : ([numberB]: Robot) => void >numberB : number console.log(numberB); @@ -42,7 +42,7 @@ function foo2([numberB]: Robot) { } function foo3([numberA2, nameA2, skillA2]: Robot) { ->foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void +>foo3 : ([numberA2, nameA2, skillA2]: Robot) => void >numberA2 : number >nameA2 : string >skillA2 : string @@ -56,7 +56,7 @@ function foo3([numberA2, nameA2, skillA2]: Robot) { } function foo4([numberA3, ...robotAInfo]: Robot) { ->foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void +>foo4 : ([numberA3, ...robotAInfo]: Robot) => void >numberA3 : number >robotAInfo : [string, string] @@ -70,12 +70,12 @@ function foo4([numberA3, ...robotAInfo]: Robot) { foo1(robotA); >foo1(robotA) : void ->foo1 : ([, nameA]: [number, string, string]) => void ->robotA : [number, string, string] +>foo1 : ([, nameA]: Robot) => void +>robotA : Robot foo1([2, "trimmer", "trimming"]); >foo1([2, "trimmer", "trimming"]) : void ->foo1 : ([, nameA]: [number, string, string]) => void +>foo1 : ([, nameA]: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -83,12 +83,12 @@ foo1([2, "trimmer", "trimming"]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([numberB]: [number, string, string]) => void ->robotA : [number, string, string] +>foo2 : ([numberB]: Robot) => void +>robotA : Robot foo2([2, "trimmer", "trimming"]); >foo2([2, "trimmer", "trimming"]) : void ->foo2 : ([numberB]: [number, string, string]) => void +>foo2 : ([numberB]: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -96,12 +96,12 @@ foo2([2, "trimmer", "trimming"]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void ->robotA : [number, string, string] +>foo3 : ([numberA2, nameA2, skillA2]: Robot) => void +>robotA : Robot foo3([2, "trimmer", "trimming"]); >foo3([2, "trimmer", "trimming"]) : void ->foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void +>foo3 : ([numberA2, nameA2, skillA2]: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -109,12 +109,12 @@ foo3([2, "trimmer", "trimming"]); foo4(robotA); >foo4(robotA) : void ->foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void ->robotA : [number, string, string] +>foo4 : ([numberA3, ...robotAInfo]: Robot) => void +>robotA : Robot foo4([2, "trimmer", "trimming"]); >foo4([2, "trimmer", "trimming"]) : void ->foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void +>foo4 : ([numberA3, ...robotAInfo]: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types index 1cdced45404..aee226f8d83 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types @@ -7,10 +7,10 @@ declare var console: { >msg : any } type Robot = [string, [string, string]]; ->Robot : [string, [string, string]] +>Robot : Robot var robotA: Robot = ["trimmer", ["trimming", "edging"]]; ->robotA : [string, [string, string]] +>robotA : Robot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -18,7 +18,7 @@ var robotA: Robot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function foo1([, skillA]: Robot) { ->foo1 : ([, skillA]: [string, [string, string]]) => void +>foo1 : ([, skillA]: Robot) => void > : undefined >skillA : [string, string] @@ -31,7 +31,7 @@ function foo1([, skillA]: Robot) { } function foo2([nameMB]: Robot) { ->foo2 : ([nameMB]: [string, [string, string]]) => void +>foo2 : ([nameMB]: Robot) => void >nameMB : string console.log(nameMB); @@ -43,7 +43,7 @@ function foo2([nameMB]: Robot) { } function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >nameMA : string >primarySkillA : string >secondarySkillA : string @@ -57,7 +57,7 @@ function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { } function foo4([...multiRobotAInfo]: Robot) { ->foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void +>foo4 : ([...multiRobotAInfo]: Robot) => void >multiRobotAInfo : [string, [string, string]] console.log(multiRobotAInfo); @@ -70,12 +70,12 @@ function foo4([...multiRobotAInfo]: Robot) { foo1(robotA); >foo1(robotA) : void ->foo1 : ([, skillA]: [string, [string, string]]) => void ->robotA : [string, [string, string]] +>foo1 : ([, skillA]: Robot) => void +>robotA : Robot foo1(["roomba", ["vaccum", "mopping"]]); >foo1(["roomba", ["vaccum", "mopping"]]) : void ->foo1 : ([, skillA]: [string, [string, string]]) => void +>foo1 : ([, skillA]: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, [string, string]] >"roomba" : "roomba" >["vaccum", "mopping"] : [string, string] @@ -84,12 +84,12 @@ foo1(["roomba", ["vaccum", "mopping"]]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([nameMB]: [string, [string, string]]) => void ->robotA : [string, [string, string]] +>foo2 : ([nameMB]: Robot) => void +>robotA : Robot foo2(["roomba", ["vaccum", "mopping"]]); >foo2(["roomba", ["vaccum", "mopping"]]) : void ->foo2 : ([nameMB]: [string, [string, string]]) => void +>foo2 : ([nameMB]: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, [string, string]] >"roomba" : "roomba" >["vaccum", "mopping"] : [string, string] @@ -98,12 +98,12 @@ foo2(["roomba", ["vaccum", "mopping"]]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void ->robotA : [string, [string, string]] +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void +>robotA : Robot foo3(["roomba", ["vaccum", "mopping"]]); >foo3(["roomba", ["vaccum", "mopping"]]) : void ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, [string, string]] >"roomba" : "roomba" >["vaccum", "mopping"] : [string, string] @@ -112,12 +112,12 @@ foo3(["roomba", ["vaccum", "mopping"]]); foo4(robotA); >foo4(robotA) : void ->foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void ->robotA : [string, [string, string]] +>foo4 : ([...multiRobotAInfo]: Robot) => void +>robotA : Robot foo4(["roomba", ["vaccum", "mopping"]]); >foo4(["roomba", ["vaccum", "mopping"]]) : void ->foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void +>foo4 : ([...multiRobotAInfo]: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, [string, string]] >"roomba" : "roomba" >["vaccum", "mopping"] : [string, string] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types index 60345aa2b73..94106255a12 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types @@ -7,17 +7,17 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { ->foo1 : ([, nameA]?: [number, string, string]) => void +>foo1 : ([, nameA]?: Robot) => void > : undefined >nameA : string >"noName" : "noName" @@ -36,7 +36,7 @@ function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { } function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { ->foo2 : ([numberB]?: [number, string, string]) => void +>foo2 : ([numberB]?: Robot) => void >numberB : number >-1 : -1 >1 : 1 @@ -55,7 +55,7 @@ function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { } function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { ->foo3 : ([numberA2, nameA2, skillA2]?: [number, string, string]) => void +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void >numberA2 : number >-1 : -1 >1 : 1 @@ -78,7 +78,7 @@ function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, } function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { ->foo4 : ([numberA3, ...robotAInfo]?: [number, string, string]) => void +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void >numberA3 : number >-1 : -1 >1 : 1 @@ -99,12 +99,12 @@ function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { foo1(robotA); >foo1(robotA) : void ->foo1 : ([, nameA]?: [number, string, string]) => void ->robotA : [number, string, string] +>foo1 : ([, nameA]?: Robot) => void +>robotA : Robot foo1([2, "trimmer", "trimming"]); >foo1([2, "trimmer", "trimming"]) : void ->foo1 : ([, nameA]?: [number, string, string]) => void +>foo1 : ([, nameA]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -112,12 +112,12 @@ foo1([2, "trimmer", "trimming"]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([numberB]?: [number, string, string]) => void ->robotA : [number, string, string] +>foo2 : ([numberB]?: Robot) => void +>robotA : Robot foo2([2, "trimmer", "trimming"]); >foo2([2, "trimmer", "trimming"]) : void ->foo2 : ([numberB]?: [number, string, string]) => void +>foo2 : ([numberB]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -125,12 +125,12 @@ foo2([2, "trimmer", "trimming"]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([numberA2, nameA2, skillA2]?: [number, string, string]) => void ->robotA : [number, string, string] +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void +>robotA : Robot foo3([2, "trimmer", "trimming"]); >foo3([2, "trimmer", "trimming"]) : void ->foo3 : ([numberA2, nameA2, skillA2]?: [number, string, string]) => void +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -138,12 +138,12 @@ foo3([2, "trimmer", "trimming"]); foo4(robotA); >foo4(robotA) : void ->foo4 : ([numberA3, ...robotAInfo]?: [number, string, string]) => void ->robotA : [number, string, string] +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void +>robotA : Robot foo4([2, "trimmer", "trimming"]); >foo4([2, "trimmer", "trimming"]) : void ->foo4 : ([numberA3, ...robotAInfo]?: [number, string, string]) => void +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types index d9c991f65fb..f2773f2d252 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types @@ -7,10 +7,10 @@ declare var console: { >msg : any } type Robot = [string, string[]]; ->Robot : [string, string[]] +>Robot : Robot var robotA: Robot = ["trimmer", ["trimming", "edging"]]; ->robotA : [string, string[]] +>robotA : Robot >["trimmer", ["trimming", "edging"]] : [string, string[]] >"trimmer" : "trimmer" >["trimming", "edging"] : string[] @@ -18,7 +18,7 @@ var robotA: Robot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { ->foo1 : ([, skillA]?: [string, string[]]) => void +>foo1 : ([, skillA]?: Robot) => void > : undefined >skillA : string[] >["noSkill", "noSkill"] : string[] @@ -39,7 +39,7 @@ function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "s } function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { ->foo2 : ([nameMB]?: [string, string[]]) => void +>foo2 : ([nameMB]?: Robot) => void >nameMB : string >"noName" : "noName" >["name", ["skill1", "skill2"]] : [string, string[]] @@ -57,7 +57,7 @@ function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { } function foo3([nameMA = "noName", [ ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, string[]]) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >nameMA : string >"noName" : "noName" @@ -84,12 +84,12 @@ function foo3([nameMA = "noName", [ foo1(robotA); >foo1(robotA) : void ->foo1 : ([, skillA]?: [string, string[]]) => void ->robotA : [string, string[]] +>foo1 : ([, skillA]?: Robot) => void +>robotA : Robot foo1(["roomba", ["vaccum", "mopping"]]); >foo1(["roomba", ["vaccum", "mopping"]]) : void ->foo1 : ([, skillA]?: [string, string[]]) => void +>foo1 : ([, skillA]?: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vaccum", "mopping"] : string[] @@ -98,12 +98,12 @@ foo1(["roomba", ["vaccum", "mopping"]]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([nameMB]?: [string, string[]]) => void ->robotA : [string, string[]] +>foo2 : ([nameMB]?: Robot) => void +>robotA : Robot foo2(["roomba", ["vaccum", "mopping"]]); >foo2(["roomba", ["vaccum", "mopping"]]) : void ->foo2 : ([nameMB]?: [string, string[]]) => void +>foo2 : ([nameMB]?: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vaccum", "mopping"] : string[] @@ -112,12 +112,12 @@ foo2(["roomba", ["vaccum", "mopping"]]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, string[]]) => void ->robotA : [string, string[]] +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void +>robotA : Robot foo3(["roomba", ["vaccum", "mopping"]]); >foo3(["roomba", ["vaccum", "mopping"]]) : void ->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, string[]]) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >["roomba", ["vaccum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vaccum", "mopping"] : string[] diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types index 2ed0777aa80..61e7f7ab3e2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types @@ -7,17 +7,17 @@ declare var console: { >msg : string } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -27,17 +27,17 @@ var robotB: Robot = [2, "trimmer", "trimming"]; let [, nameA] = robotA; > : undefined >nameA : string ->robotA : [number, string, string] +>robotA : Robot let [numberB] = robotB; >numberB : number ->robotB : [number, string, string] +>robotB : Robot let [numberA2, nameA2, skillA2] = robotA; >numberA2 : number >nameA2 : string >skillA2 : string ->robotA : [number, string, string] +>robotA : Robot let [numberC2] = [3, "edging", "Trimming edges"]; >numberC2 : number @@ -58,7 +58,7 @@ let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; let [numberA3, ...robotAInfo] = robotA; >numberA3 : number >robotAInfo : [string, string] ->robotA : [number, string, string] +>robotA : Robot if (nameA == nameA2) { >nameA == nameA2 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types index 94b0ff295a2..9027e3be196 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types @@ -7,10 +7,10 @@ declare var console: { >msg : string } type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -18,7 +18,7 @@ var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -28,17 +28,17 @@ var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; let [, skillA] = multiRobotA; > : undefined >skillA : [string, string] ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot let [nameMB] = multiRobotB; >nameMB : string ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; >nameMA : string >primarySkillA : string >secondarySkillA : string ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot let [nameMC] = ["roomba", ["vaccum", "mopping"]]; >nameMC : string @@ -60,7 +60,7 @@ let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping let [...multiRobotAInfo] = multiRobotA; >multiRobotAInfo : [string, [string, string]] ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot if (nameMB == nameMA) { >nameMB == nameMA : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types index 10025aabc0a..1ee682f838a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, [string, string]]; ->MultiSkilledRobot : [string, [string, string]] +>MultiSkilledRobot : MultiSkilledRobot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, [string, string]] >"mower" : "mower" >["mowing", ""] : [string, string] @@ -35,7 +35,7 @@ var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, [string, string]] >"trimmer" : "trimmer" >["trimming", "edging"] : [string, string] @@ -61,19 +61,19 @@ let multiRobotAInfo: (string | [string, string])[]; >multiRobotAInfo : (string | [string, string])[] [, nameA] = robotA; ->[, nameA] = robotA : [number, string, string] +>[, nameA] = robotA : Robot >[, nameA] : [undefined, string] > : undefined >nameA : string ->robotA : [number, string, string] +>robotA : Robot [, nameB] = getRobotB(); ->[, nameB] = getRobotB() : [number, string, string] +>[, nameB] = getRobotB() : Robot >[, nameB] : [undefined, string] > : undefined >nameB : string ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [, nameB] = [2, "trimmer", "trimming"]; >[, nameB] = [2, "trimmer", "trimming"] : [number, string, string] @@ -86,19 +86,19 @@ let multiRobotAInfo: (string | [string, string])[]; >"trimming" : "trimming" [, multiSkillB] = multiRobotB; ->[, multiSkillB] = multiRobotB : [string, [string, string]] +>[, multiSkillB] = multiRobotB : MultiSkilledRobot >[, multiSkillB] : [undefined, [string, string]] > : undefined >multiSkillB : [string, string] ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot [, multiSkillB] = getMultiRobotB(); ->[, multiSkillB] = getMultiRobotB() : [string, [string, string]] +>[, multiSkillB] = getMultiRobotB() : MultiSkilledRobot >[, multiSkillB] : [undefined, [string, string]] > : undefined >multiSkillB : [string, string] ->getMultiRobotB() : [string, [string, string]] ->getMultiRobotB : () => [string, [string, string]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] : [string, [string, string]] @@ -112,17 +112,17 @@ let multiRobotAInfo: (string | [string, string])[]; >"mopping" : "mopping" [numberB] = robotB; ->[numberB] = robotB : [number, string, string] +>[numberB] = robotB : Robot >[numberB] : [number] >numberB : number ->robotB : [number, string, string] +>robotB : Robot [numberB] = getRobotB(); ->[numberB] = getRobotB() : [number, string, string] +>[numberB] = getRobotB() : Robot >[numberB] : [number] >numberB : number ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB] = [2, "trimmer", "trimming"]; >[numberB] = [2, "trimmer", "trimming"] : [number, string, string] @@ -134,17 +134,17 @@ let multiRobotAInfo: (string | [string, string])[]; >"trimming" : "trimming" [nameMB] = multiRobotB; ->[nameMB] = multiRobotB : [string, [string, string]] +>[nameMB] = multiRobotB : MultiSkilledRobot >[nameMB] : [string] >nameMB : string ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot [nameMB] = getMultiRobotB(); ->[nameMB] = getMultiRobotB() : [string, [string, string]] +>[nameMB] = getMultiRobotB() : MultiSkilledRobot >[nameMB] : [string] >nameMB : string ->getMultiRobotB() : [string, [string, string]] ->getMultiRobotB : () => [string, [string, string]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [nameMB] = ["trimmer", ["trimming", "edging"]]; >[nameMB] = ["trimmer", ["trimming", "edging"]] : [string, string[]] @@ -157,21 +157,21 @@ let multiRobotAInfo: (string | [string, string])[]; >"edging" : "edging" [numberB, nameB, skillB] = robotB; ->[numberB, nameB, skillB] = robotB : [number, string, string] +>[numberB, nameB, skillB] = robotB : Robot >[numberB, nameB, skillB] : [number, string, string] >numberB : number >nameB : string >skillB : string ->robotB : [number, string, string] +>robotB : Robot [numberB, nameB, skillB] = getRobotB(); ->[numberB, nameB, skillB] = getRobotB() : [number, string, string] +>[numberB, nameB, skillB] = getRobotB() : Robot >[numberB, nameB, skillB] : [number, string, string] >numberB : number >nameB : string >skillB : string ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB, nameB, skillB] = [2, "trimmer", "trimming"]; >[numberB, nameB, skillB] = [2, "trimmer", "trimming"] : [number, string, string] @@ -185,23 +185,23 @@ let multiRobotAInfo: (string | [string, string])[]; >"trimming" : "trimming" [nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; ->[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB : MultiSkilledRobot >[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] >nameMB : string >[primarySkillB, secondarySkillB] : [string, string] >primarySkillB : string >secondarySkillB : string ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot [nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); ->[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() : MultiSkilledRobot >[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] >nameMB : string >[primarySkillB, secondarySkillB] : [string, string] >primarySkillB : string >secondarySkillB : string ->getMultiRobotB() : [string, [string, string]] ->getMultiRobotB : () => [string, [string, string]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] @@ -217,48 +217,48 @@ let multiRobotAInfo: (string | [string, string])[]; >"edging" : "edging" [numberB, ...robotAInfo] = robotB; ->[numberB, ...robotAInfo] = robotB : [number, string, string] +>[numberB, ...robotAInfo] = robotB : Robot >[numberB, ...robotAInfo] : [number, ...(string | number)[]] >numberB : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robotB : [number, string, string] +>robotB : Robot [numberB, ...robotAInfo] = getRobotB(); ->[numberB, ...robotAInfo] = getRobotB() : [number, string, string] +>[numberB, ...robotAInfo] = getRobotB() : Robot >[numberB, ...robotAInfo] : [number, ...(string | number)[]] >numberB : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; ->[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] : Robot >[numberB, ...robotAInfo] : [number, ...(string | number)[]] >numberB : number >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" [...multiRobotAInfo] = multiRobotA; ->[...multiRobotAInfo] = multiRobotA : [string, [string, string]] +>[...multiRobotAInfo] = multiRobotA : MultiSkilledRobot >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->multiRobotA : [string, [string, string]] +>multiRobotA : MultiSkilledRobot [...multiRobotAInfo] = getMultiRobotB(); ->[...multiRobotAInfo] = getMultiRobotB() : [string, [string, string]] +>[...multiRobotAInfo] = getMultiRobotB() : MultiSkilledRobot >[...multiRobotAInfo] : (string | [string, string])[] >...multiRobotAInfo : string | [string, string] >multiRobotAInfo : (string | [string, string])[] ->getMultiRobotB() : [string, [string, string]] ->getMultiRobotB : () => [string, [string, string]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : (string | [string, string])[] @@ -285,15 +285,15 @@ if (nameA == nameB) { } function getRobotB() { ->getRobotB : () => [number, string, string] +>getRobotB : () => Robot return robotB; ->robotB : [number, string, string] +>robotB : Robot } function getMultiRobotB() { ->getMultiRobotB : () => [string, [string, string]] +>getMultiRobotB : () => MultiSkilledRobot return multiRobotB; ->multiRobotB : [string, [string, string]] +>multiRobotB : MultiSkilledRobot } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types index 7e4ae19d394..0bdf495f09e 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types @@ -7,17 +7,17 @@ declare var console: { >msg : string } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -27,13 +27,13 @@ let [, nameA = "noName"] = robotA; > : undefined >nameA : string >"noName" : "noName" ->robotA : [number, string, string] +>robotA : Robot let [numberB = -1] = robotB; >numberB : number >-1 : -1 >1 : 1 ->robotB : [number, string, string] +>robotB : Robot let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; >numberA2 : number @@ -43,7 +43,7 @@ let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; >"noName" : "noName" >skillA2 : string >"noSkill" : "noSkill" ->robotA : [number, string, string] +>robotA : Robot let [numberC2 = -1] = [3, "edging", "Trimming edges"]; >numberC2 : number @@ -72,7 +72,7 @@ let [numberA3 = -1, ...robotAInfo] = robotA; >-1 : -1 >1 : 1 >robotAInfo : [string, string] ->robotA : [number, string, string] +>robotA : Robot if (nameA == nameA2) { >nameA == nameA2 : boolean diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types index 3781d10d069..44fbba0b1ad 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types @@ -7,10 +7,10 @@ declare var console: { >msg : string } type MultiSkilledRobot = [string, string[]]; ->MultiSkilledRobot : [string, string[]] +>MultiSkilledRobot : MultiSkilledRobot var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, string[]] >"mower" : "mower" >["mowing", ""] : string[] @@ -18,7 +18,7 @@ var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, string[]] >"trimmer" : "trimmer" >["trimming", "edging"] : string[] @@ -31,12 +31,12 @@ let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; >["noSkill", "noSkill"] : string[] >"noSkill" : "noSkill" >"noSkill" : "noSkill" ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot let [nameMB = "noName" ] = multiRobotB; >nameMB : string >"noName" : "noName" ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; >nameMA : string @@ -48,7 +48,7 @@ let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] >["noSkill", "noSkill"] : [string, string] >"noSkill" : "noSkill" >"noSkill" : "noSkill" ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; >nameMC : string diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types index 2f9d1dac6e3..8968f49732e 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types @@ -7,27 +7,27 @@ declare var console: { >msg : any } type Robot = [number, string, string]; ->Robot : [number, string, string] +>Robot : Robot type MultiSkilledRobot = [string, string[]]; ->MultiSkilledRobot : [string, string[]] +>MultiSkilledRobot : MultiSkilledRobot var robotA: Robot = [1, "mower", "mowing"]; ->robotA : [number, string, string] +>robotA : Robot >[1, "mower", "mowing"] : [number, string, string] >1 : 1 >"mower" : "mower" >"mowing" : "mowing" var robotB: Robot = [2, "trimmer", "trimming"]; ->robotB : [number, string, string] +>robotB : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" >"trimming" : "trimming" var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; ->multiRobotA : [string, string[]] +>multiRobotA : MultiSkilledRobot >["mower", ["mowing", ""]] : [string, string[]] >"mower" : "mower" >["mowing", ""] : string[] @@ -35,7 +35,7 @@ var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; >"" : "" var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot >["trimmer", ["trimming", "edging"]] : [string, string[]] >"trimmer" : "trimmer" >["trimming", "edging"] : string[] @@ -61,23 +61,23 @@ let multiRobotAInfo: (string | string[])[]; >multiRobotAInfo : (string | string[])[] [, nameA = "helloNoName"] = robotA; ->[, nameA = "helloNoName"] = robotA : [number, string, string] +>[, nameA = "helloNoName"] = robotA : Robot >[, nameA = "helloNoName"] : [undefined, string] > : undefined >nameA = "helloNoName" : "helloNoName" >nameA : string >"helloNoName" : "helloNoName" ->robotA : [number, string, string] +>robotA : Robot [, nameB = "helloNoName"] = getRobotB(); ->[, nameB = "helloNoName"] = getRobotB() : [number, string, string] +>[, nameB = "helloNoName"] = getRobotB() : Robot >[, nameB = "helloNoName"] : [undefined, string] > : undefined >nameB = "helloNoName" : "helloNoName" >nameB : string >"helloNoName" : "helloNoName" ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] : [number, string, string] @@ -92,23 +92,23 @@ let multiRobotAInfo: (string | string[])[]; >"trimming" : "trimming" [, multiSkillB = []] = multiRobotB; ->[, multiSkillB = []] = multiRobotB : [string, string[]] +>[, multiSkillB = []] = multiRobotB : MultiSkilledRobot >[, multiSkillB = []] : [undefined, undefined[]] > : undefined >multiSkillB = [] : undefined[] >multiSkillB : string[] >[] : undefined[] ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot [, multiSkillB = []] = getMultiRobotB(); ->[, multiSkillB = []] = getMultiRobotB() : [string, string[]] +>[, multiSkillB = []] = getMultiRobotB() : MultiSkilledRobot >[, multiSkillB = []] : [undefined, undefined[]] > : undefined >multiSkillB = [] : undefined[] >multiSkillB : string[] >[] : undefined[] ->getMultiRobotB() : [string, string[]] ->getMultiRobotB : () => [string, string[]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] : [string, string[]] @@ -124,23 +124,23 @@ let multiRobotAInfo: (string | string[])[]; >"mopping" : "mopping" [numberB = -1] = robotB; ->[numberB = -1] = robotB : [number, string, string] +>[numberB = -1] = robotB : Robot >[numberB = -1] : [number] >numberB = -1 : -1 >numberB : number >-1 : -1 >1 : 1 ->robotB : [number, string, string] +>robotB : Robot [numberB = -1] = getRobotB(); ->[numberB = -1] = getRobotB() : [number, string, string] +>[numberB = -1] = getRobotB() : Robot >[numberB = -1] : [number] >numberB = -1 : -1 >numberB : number >-1 : -1 >1 : 1 ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB = -1] = [2, "trimmer", "trimming"]; >[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] @@ -155,21 +155,21 @@ let multiRobotAInfo: (string | string[])[]; >"trimming" : "trimming" [nameMB = "helloNoName"] = multiRobotB; ->[nameMB = "helloNoName"] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName"] = multiRobotB : MultiSkilledRobot >[nameMB = "helloNoName"] : [string] >nameMB = "helloNoName" : "helloNoName" >nameMB : string >"helloNoName" : "helloNoName" ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot [nameMB = "helloNoName"] = getMultiRobotB(); ->[nameMB = "helloNoName"] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName"] = getMultiRobotB() : MultiSkilledRobot >[nameMB = "helloNoName"] : [string] >nameMB = "helloNoName" : "helloNoName" >nameMB : string >"helloNoName" : "helloNoName" ->getMultiRobotB() : [string, string[]] ->getMultiRobotB : () => [string, string[]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] @@ -184,7 +184,7 @@ let multiRobotAInfo: (string | string[])[]; >"edging" : "edging" [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB : Robot >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] >numberB = -1 : -1 >numberB : number @@ -196,10 +196,10 @@ let multiRobotAInfo: (string | string[])[]; >skillB = "noSkill" : "noSkill" >skillB : string >"noSkill" : "noSkill" ->robotB : [number, string, string] +>robotB : Robot [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); ->[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() : Robot >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] >numberB = -1 : -1 >numberB : number @@ -211,8 +211,8 @@ let multiRobotAInfo: (string | string[])[]; >skillB = "noSkill" : "noSkill" >skillB : string >"noSkill" : "noSkill" ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] : [number, string, string] @@ -233,7 +233,7 @@ let multiRobotAInfo: (string | string[])[]; >"trimming" : "trimming" [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : MultiSkilledRobot >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []] >nameMB = "helloNoName" : "helloNoName" >nameMB : string @@ -247,10 +247,10 @@ let multiRobotAInfo: (string | string[])[]; >secondarySkillB : string >"noSkill" : "noSkill" >[] : [] ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); ->[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : MultiSkilledRobot >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []] >nameMB = "helloNoName" : "helloNoName" >nameMB : string @@ -264,8 +264,8 @@ let multiRobotAInfo: (string | string[])[]; >secondarySkillB : string >"noSkill" : "noSkill" >[] : [] ->getMultiRobotB() : [string, string[]] ->getMultiRobotB : () => [string, string[]] +>getMultiRobotB() : MultiSkilledRobot +>getMultiRobotB : () => MultiSkilledRobot [nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] @@ -291,7 +291,7 @@ let multiRobotAInfo: (string | string[])[]; >"edging" : "edging" [numberB = -1, ...robotAInfo] = robotB; ->[numberB = -1, ...robotAInfo] = robotB : [number, string, string] +>[numberB = -1, ...robotAInfo] = robotB : Robot >[numberB = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberB = -1 : -1 >numberB : number @@ -299,10 +299,10 @@ let multiRobotAInfo: (string | string[])[]; >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->robotB : [number, string, string] +>robotB : Robot [numberB = -1, ...robotAInfo] = getRobotB(); ->[numberB = -1, ...robotAInfo] = getRobotB() : [number, string, string] +>[numberB = -1, ...robotAInfo] = getRobotB() : Robot >[numberB = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberB = -1 : -1 >numberB : number @@ -310,11 +310,11 @@ let multiRobotAInfo: (string | string[])[]; >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->getRobotB() : [number, string, string] ->getRobotB : () => [number, string, string] +>getRobotB() : Robot +>getRobotB : () => Robot [numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; ->[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : Robot >[numberB = -1, ...robotAInfo] : [number, ...(string | number)[]] >numberB = -1 : -1 >numberB : number @@ -322,7 +322,7 @@ let multiRobotAInfo: (string | string[])[]; >1 : 1 >...robotAInfo : string | number >robotAInfo : (string | number)[] ->[2, "trimmer", "trimming"] : [number, string, string] +>[2, "trimmer", "trimming"] : Robot >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -342,15 +342,15 @@ if (nameA == nameB) { } function getRobotB() { ->getRobotB : () => [number, string, string] +>getRobotB : () => Robot return robotB; ->robotB : [number, string, string] +>robotB : Robot } function getMultiRobotB() { ->getMultiRobotB : () => [string, string[]] +>getMultiRobotB : () => MultiSkilledRobot return multiRobotB; ->multiRobotB : [string, string[]] +>multiRobotB : MultiSkilledRobot } diff --git a/tests/baselines/reference/specedNoStackBlown.types b/tests/baselines/reference/specedNoStackBlown.types index 654f98941df..f2ef490fa80 100644 --- a/tests/baselines/reference/specedNoStackBlown.types +++ b/tests/baselines/reference/specedNoStackBlown.types @@ -26,10 +26,10 @@ type ErrorMsg = >field : string export type Spec = [Predicate, ErrorMsg]; ->Spec : [Predicate, ErrorMsg] +>Spec : Spec export type SpecArray = Array>; ->SpecArray : [Predicate, ErrorMsg][] +>SpecArray : Spec[] export type SpecFunction = [INPUT] extends [ReadonlyArray] >SpecFunction : SpecFunction diff --git a/tests/baselines/reference/spreadBooleanRespectsFreshness.types b/tests/baselines/reference/spreadBooleanRespectsFreshness.types index c607422b062..cd20dc31944 100644 --- a/tests/baselines/reference/spreadBooleanRespectsFreshness.types +++ b/tests/baselines/reference/spreadBooleanRespectsFreshness.types @@ -7,7 +7,7 @@ type FooBase = string | false; >false : false type FooArray = FooBase[]; ->FooArray : FooBase[] +>FooArray : FooArray declare let foo1: Foo; >foo1 : Foo @@ -20,13 +20,13 @@ foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]]; >foo1 : Foo >[...Array.isArray(foo2) ? foo2 : [foo2]] : FooBase[] >...Array.isArray(foo2) ? foo2 : [foo2] : FooBase ->Array.isArray(foo2) ? foo2 : [foo2] : FooBase[] +>Array.isArray(foo2) ? foo2 : [foo2] : FooArray >Array.isArray(foo2) : boolean >Array.isArray : (arg: any) => arg is any[] >Array : ArrayConstructor >isArray : (arg: any) => arg is any[] >foo2 : Foo ->foo2 : FooBase[] +>foo2 : FooArray >[foo2] : FooBase[] >foo2 : FooBase diff --git a/tests/baselines/reference/spreadTypeVariable.types b/tests/baselines/reference/spreadTypeVariable.types index c5de712fb19..0e836355d42 100644 --- a/tests/baselines/reference/spreadTypeVariable.types +++ b/tests/baselines/reference/spreadTypeVariable.types @@ -37,7 +37,7 @@ function f4(arg: T) { } function f5(arg: T) { ->f5 : (arg: T) => T +>f5 : (arg: T) => T >key : string >arg : T diff --git a/tests/baselines/reference/tupleTypes.errors.txt b/tests/baselines/reference/tupleTypes.errors.txt index af76c872a6f..a3c2fc00eb4 100644 --- a/tests/baselines/reference/tupleTypes.errors.txt +++ b/tests/baselines/reference/tupleTypes.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/tupleTypes.ts(18,1): error TS2322: Type '[number, string, n Type '3' is not assignable to type '2'. tests/cases/compiler/tupleTypes.ts(35,14): error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'. tests/cases/compiler/tupleTypes.ts(36,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'tt2' must be of type 'undefined', but here has type 'string | number'. -tests/cases/compiler/tupleTypes.ts(41,1): error TS2322: Type '[]' is not assignable to type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(41,1): error TS2739: Type '[]' is missing the following properties from type '[number, string]': 0, 1 tests/cases/compiler/tupleTypes.ts(47,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. @@ -87,7 +87,7 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n tt = [undefined, undefined]; tt = []; // Error ~~ -!!! error TS2322: Type '[]' is not assignable to type '[number, string]'. +!!! error TS2739: Type '[]' is missing the following properties from type '[number, string]': 0, 1 var a: number[]; var a1: [number, string]; diff --git a/tests/baselines/reference/typeAliases.types b/tests/baselines/reference/typeAliases.types index 8790c043adf..3eff23307dc 100644 --- a/tests/baselines/reference/typeAliases.types +++ b/tests/baselines/reference/typeAliases.types @@ -183,22 +183,22 @@ f15(E.x).toLowerCase(); >toLowerCase : () => string type StringAndBoolean = [string, boolean] ->StringAndBoolean : [string, boolean] +>StringAndBoolean : StringAndBoolean declare function f16(s: StringAndBoolean): string; ->f16 : (s: [string, boolean]) => string ->s : [string, boolean] +>f16 : (s: StringAndBoolean) => string +>s : StringAndBoolean var x: [string, boolean]; >x : [string, boolean] f16(x); >f16(x) : string ->f16 : (s: [string, boolean]) => string +>f16 : (s: StringAndBoolean) => string >x : [string, boolean] var y: StringAndBoolean = ["1", false]; ->y : [string, boolean] +>y : StringAndBoolean >["1", false] : [string, false] >"1" : "1" >false : false @@ -207,7 +207,7 @@ y[0].toLowerCase(); >y[0].toLowerCase() : string >y[0].toLowerCase : () => string >y[0] : string ->y : [string, boolean] +>y : StringAndBoolean >0 : 0 >toLowerCase : () => string diff --git a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty.types b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty.types index 4e3d2e0743e..1f36901d437 100644 --- a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty.types +++ b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty.types @@ -208,10 +208,10 @@ interface Y { } type A = ["aa", number]; ->A : ["aa", number] +>A : A type B = ["bb", string]; ->B : ["bb", string] +>B : B type Z = X | Y; >Z : Z @@ -271,7 +271,7 @@ function check(z: Z, c: C) { var aa: number = c[1] // should be number >aa : number >c[1] : number ->c : ["aa", number] +>c : A >1 : 1 break; @@ -281,7 +281,7 @@ function check(z: Z, c: C) { var bb: string = c[1] // should be string >bb : string >c[1] : string ->c : ["bb", string] +>c : B >1 : 1 break; diff --git a/tests/baselines/reference/typeInferenceLiteralUnion.types b/tests/baselines/reference/typeInferenceLiteralUnion.types index de4637c52c5..84a65ccbc53 100644 --- a/tests/baselines/reference/typeInferenceLiteralUnion.types +++ b/tests/baselines/reference/typeInferenceLiteralUnion.types @@ -56,11 +56,11 @@ export function extent(array: Array): [T | Pri let extentMixed: [Primitive | NumCoercible, Primitive | NumCoercible] | [undefined, undefined]; ->extentMixed : [undefined, undefined] | [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] +>extentMixed : [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] | [undefined, undefined] extentMixed = extent([new NumCoercible(10), 13, '12', true]); >extentMixed = extent([new NumCoercible(10), 13, '12', true]) : [undefined, undefined] | [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] ->extentMixed : [undefined, undefined] | [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] +>extentMixed : [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] | [undefined, undefined] >extent([new NumCoercible(10), 13, '12', true]) : [undefined, undefined] | [string | number | boolean | Date | NumCoercible, string | number | boolean | Date | NumCoercible] >extent : (array: (string | number | boolean | Date | T)[]) => [string | number | boolean | Date | T, string | number | boolean | Date | T] | [undefined, undefined] >[new NumCoercible(10), 13, '12', true] : (string | number | true | NumCoercible)[] diff --git a/tests/baselines/reference/typePredicateStructuralMatch.types b/tests/baselines/reference/typePredicateStructuralMatch.types index b4f5dbea3f1..48cca07cf10 100644 --- a/tests/baselines/reference/typePredicateStructuralMatch.types +++ b/tests/baselines/reference/typePredicateStructuralMatch.types @@ -2,25 +2,25 @@ // Repro from #12235 getResults1([]); ->getResults1([]) : Result[] ->getResults1 : (value: Result[] | { data: Result[]; }) => Result[] +>getResults1([]) : Results +>getResults1 : (value: Results | { data: Results; }) => Results >[] : undefined[] getResults1({data: []}); ->getResults1({data: []}) : Result[] ->getResults1 : (value: Result[] | { data: Result[]; }) => Result[] +>getResults1({data: []}) : Results +>getResults1 : (value: Results | { data: Results; }) => Results >{data: []} : { data: undefined[]; } >data : undefined[] >[] : undefined[] getResults2([]); ->getResults2([]) : Result[] ->getResults2 : (value: Result[] | { data: Result[]; }) => Result[] +>getResults2([]) : Results +>getResults2 : (value: Results | { data: Results; }) => Results >[] : undefined[] getResults2({data: []}); ->getResults2({data: []}) : Result[] ->getResults2 : (value: Result[] | { data: Result[]; }) => Result[] +>getResults2({data: []}) : Results +>getResults2 : (value: Results | { data: Results; }) => Results >{data: []} : { data: undefined[]; } >data : undefined[] >[] : undefined[] @@ -30,7 +30,7 @@ type Result = { value: string }; >value : string type Results = Result[]; ->Results : Result[] +>Results : Results function isResponseInData(value: T | { data: T}): value is { data: T } { >isResponseInData : (value: T | { data: T; }) => value is { data: T; } @@ -47,19 +47,19 @@ function isResponseInData(value: T | { data: T}): value is { data: T } { } function getResults1(value: Results | { data: Results }): Results { ->getResults1 : (value: Result[] | { data: Result[]; }) => Result[] ->value : Result[] | { data: Result[]; } ->data : Result[] +>getResults1 : (value: Results | { data: Results; }) => Results +>value : Results | { data: Results; } +>data : Results return isResponseInData(value) ? value.data : value; ->isResponseInData(value) ? value.data : value : Result[] +>isResponseInData(value) ? value.data : value : Results >isResponseInData(value) : boolean >isResponseInData : (value: T | { data: T; }) => value is { data: T; } ->value : Result[] | { data: Result[]; } ->value.data : Result[] ->value : { data: Result[]; } ->data : Result[] ->value : Result[] +>value : Results | { data: Results; } +>value.data : Results +>value : { data: Results; } +>data : Results +>value : Results } function isPlainResponse(value: T | { data: T}): value is T { @@ -77,17 +77,17 @@ function isPlainResponse(value: T | { data: T}): value is T { } function getResults2(value: Results | { data: Results }): Results { ->getResults2 : (value: Result[] | { data: Result[]; }) => Result[] ->value : Result[] | { data: Result[]; } ->data : Result[] +>getResults2 : (value: Results | { data: Results; }) => Results +>value : Results | { data: Results; } +>data : Results return isPlainResponse(value) ? value : value.data; ->isPlainResponse(value) ? value : value.data : Result[] +>isPlainResponse(value) ? value : value.data : Results >isPlainResponse(value) : boolean >isPlainResponse : (value: T | { data: T; }) => value is T ->value : Result[] | { data: Result[]; } ->value : Result[] ->value.data : Result[] ->value : { data: Result[]; } ->data : Result[] +>value : Results | { data: Results; } +>value : Results +>value.data : Results +>value : { data: Results; } +>data : Results } diff --git a/tests/baselines/reference/unionTypeWithLeadingOperator.types b/tests/baselines/reference/unionTypeWithLeadingOperator.types index 930ff71f3f7..63d2e7c018d 100644 --- a/tests/baselines/reference/unionTypeWithLeadingOperator.types +++ b/tests/baselines/reference/unionTypeWithLeadingOperator.types @@ -12,7 +12,7 @@ type B = >type : "DECREMENT" type C = [| 0 | 1, | "foo" | "bar"]; ->C : [0 | 1, "foo" | "bar"] +>C : C export type D = >D : D diff --git a/tests/baselines/reference/unionsOfTupleTypes1.errors.txt b/tests/baselines/reference/unionsOfTupleTypes1.errors.txt index da997e988ee..344bd49f54f 100644 --- a/tests/baselines/reference/unionsOfTupleTypes1.errors.txt +++ b/tests/baselines/reference/unionsOfTupleTypes1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(8,15): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(8,15): error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(13,15): error TS2339: Property '2' does not exist on type 'T2'. -tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(27,20): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(27,20): error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(28,20): error TS2339: Property '2' does not exist on type 'T2'. -tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(31,16): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(31,16): error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(32,16): error TS2339: Property '2' does not exist on type 'T2'. -tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(37,18): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(37,18): error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: Property '2' does not exist on type 'T2'. @@ -18,7 +18,7 @@ tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: type T11 = T1[1]; // number type T12 = T1[2]; // undefined ~ -!!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +!!! error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. type T1N = T1[number]; // string | number type T20 = T2[0]; // string | boolean @@ -41,7 +41,7 @@ tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { let [d10, d11, d12] = t1; // string, number ~~~ -!!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +!!! error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. let [d20, d21, d22] = t2; // string | boolean, number | undefined ~~~ !!! error TS2339: Property '2' does not exist on type 'T2'. @@ -49,7 +49,7 @@ tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined [d10, d11, d12] = t1; ~~~ -!!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +!!! error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. [d20, d21, d22] = t2; ~~~ !!! error TS2339: Property '2' does not exist on type 'T2'. @@ -59,7 +59,7 @@ tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: let t11 = t1[1]; // number let t12 = t1[2]; // undefined ~ -!!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +!!! error TS2493: Tuple type 'T1' of length '2' has no element at index '2'. let t1x = t1[x]; // string | number let t20 = t2[0]; // string | boolean let t21 = t2[1]; // number | undefined diff --git a/tests/baselines/reference/unionsOfTupleTypes1.types b/tests/baselines/reference/unionsOfTupleTypes1.types index e0867cd1045..f1142821d28 100644 --- a/tests/baselines/reference/unionsOfTupleTypes1.types +++ b/tests/baselines/reference/unionsOfTupleTypes1.types @@ -1,12 +1,12 @@ === tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts === type T1 = [string, number]; ->T1 : [string, number] +>T1 : T1 type T2 = [boolean] | [string, number]; >T2 : T2 type T3 = [string, ...number[]]; ->T3 : [string, ...number[]] +>T3 : T3 type T4 = [boolean] | [string, ...number[]]; >T4 : T4 @@ -60,10 +60,10 @@ type T4N = T4[number]; // string | number | boolean >T4N : string | number | boolean function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { ->f1 : (t1: [string, number], t2: T2, t3: [string, ...number[]], t4: T4, x: number) => void ->t1 : [string, number] +>f1 : (t1: T1, t2: T2, t3: T3, t4: T4, x: number) => void +>t1 : T1 >t2 : T2 ->t3 : [string, ...number[]] +>t3 : T3 >t4 : T4 >x : number @@ -71,7 +71,7 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { >d10 : string >d11 : number >d12 : undefined ->t1 : [string, number] +>t1 : T1 let [d20, d21, d22] = t2; // string | boolean, number | undefined >d20 : string | boolean @@ -83,7 +83,7 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { >d30 : string >d31 : number >d32 : number ->t3 : [string, ...number[]] +>t3 : T3 let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined >d40 : string | boolean @@ -92,12 +92,12 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { >t4 : T4 [d10, d11, d12] = t1; ->[d10, d11, d12] = t1 : [string, number] +>[d10, d11, d12] = t1 : T1 >[d10, d11, d12] : [string, number, undefined] >d10 : string >d11 : number >d12 : undefined ->t1 : [string, number] +>t1 : T1 [d20, d21, d22] = t2; >[d20, d21, d22] = t2 : T2 @@ -108,12 +108,12 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { >t2 : T2 [d30, d31, d32] = t3; ->[d30, d31, d32] = t3 : [string, ...number[]] +>[d30, d31, d32] = t3 : T3 >[d30, d31, d32] : [string, number, number] >d30 : string >d31 : number >d32 : number ->t3 : [string, ...number[]] +>t3 : T3 [d40, d41, d42] = t4; >[d40, d41, d42] = t4 : T4 @@ -126,25 +126,25 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { let t10 = t1[0]; // string >t10 : string >t1[0] : string ->t1 : [string, number] +>t1 : T1 >0 : 0 let t11 = t1[1]; // number >t11 : number >t1[1] : number ->t1 : [string, number] +>t1 : T1 >1 : 1 let t12 = t1[2]; // undefined >t12 : undefined >t1[2] : undefined ->t1 : [string, number] +>t1 : T1 >2 : 2 let t1x = t1[x]; // string | number >t1x : string | number >t1[x] : string | number ->t1 : [string, number] +>t1 : T1 >x : number let t20 = t2[0]; // string | boolean @@ -174,25 +174,25 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { let t30 = t3[0]; // string >t30 : string >t3[0] : string ->t3 : [string, ...number[]] +>t3 : T3 >0 : 0 let t31 = t3[1]; // number >t31 : number >t3[1] : number ->t3 : [string, ...number[]] +>t3 : T3 >1 : 1 let t32 = t3[2]; // number >t32 : number >t3[2] : number ->t3 : [string, ...number[]] +>t3 : T3 >2 : 2 let t3x = t3[x]; // string | number >t3x : string | number >t3[x] : string | number ->t3 : [string, ...number[]] +>t3 : T3 >x : number let t40 = t4[0]; // string | boolean @@ -222,7 +222,7 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { t1[1] = 42; >t1[1] = 42 : 42 >t1[1] : number ->t1 : [string, number] +>t1 : T1 >1 : 1 >42 : 42 @@ -236,7 +236,7 @@ function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { t3[1] = 42; >t3[1] = 42 : 42 >t3[1] : number ->t3 : [string, ...number[]] +>t3 : T3 >1 : 1 >42 : 42