mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
+3
-1
@@ -2351,7 +2351,9 @@ declare namespace ts {
|
||||
*/
|
||||
export interface TypeReference extends ObjectType {
|
||||
target: GenericType;
|
||||
typeArguments?: ReadonlyArray<Type>;
|
||||
node?: ArrayTypeNode | TupleTypeNode;
|
||||
}
|
||||
export interface DeferredTypeReference extends TypeReference {
|
||||
}
|
||||
export interface GenericType extends InterfaceType, TypeReference {
|
||||
}
|
||||
|
||||
+3
-1
@@ -2351,7 +2351,9 @@ declare namespace ts {
|
||||
*/
|
||||
export interface TypeReference extends ObjectType {
|
||||
target: GenericType;
|
||||
typeArguments?: ReadonlyArray<Type>;
|
||||
node?: ArrayTypeNode | TupleTypeNode;
|
||||
}
|
||||
export interface DeferredTypeReference extends TypeReference {
|
||||
}
|
||||
export interface GenericType extends InterfaceType, TypeReference {
|
||||
}
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
|
||||
|
||||
? 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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | 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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
|
||||
>this.state.result : any
|
||||
>this.state : any
|
||||
>this : this
|
||||
|
||||
@@ -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<any>'.
|
||||
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': 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<any>'.
|
||||
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': 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> | 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> | 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<any>'.
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | 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<any>'.
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | 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?
|
||||
</FetchUser>
|
||||
);
|
||||
|
||||
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
|
||||
|
||||
? 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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | 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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>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<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
|
||||
>this.state.result : any
|
||||
>this.state : any
|
||||
>this : this
|
||||
|
||||
@@ -1029,28 +1029,28 @@ declare module Immutable {
|
||||
>value : T[K]
|
||||
|
||||
merge(...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
|
||||
>merge : (...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
|
||||
>collections : (Iterable<[string, any]> | Partial<T>)[]
|
||||
>merge : (...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
|
||||
>collections : (Partial<T> | Iterable<[string, any]>)[]
|
||||
|
||||
mergeDeep(...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
|
||||
>mergeDeep : (...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
|
||||
>collections : (Iterable<[string, any]> | Partial<T>)[]
|
||||
>mergeDeep : (...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
|
||||
>collections : (Partial<T> | Iterable<[string, any]>)[]
|
||||
|
||||
mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
|
||||
>mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
|
||||
>mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Partial<T> | 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<T>)[]
|
||||
>collections : (Partial<T> | Iterable<[string, any]>)[]
|
||||
|
||||
mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
|
||||
>mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
|
||||
>mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
|
||||
>merger : (oldVal: any, newVal: any, key: any) => any
|
||||
>oldVal : any
|
||||
>newVal : any
|
||||
>key : any
|
||||
>collections : (Iterable<[string, any]> | Partial<T>)[]
|
||||
>collections : (Partial<T> | Iterable<[string, any]>)[]
|
||||
|
||||
delete<K extends keyof T>(key: K): this;
|
||||
>delete : <K extends keyof T>(key: K) => this
|
||||
|
||||
@@ -494,7 +494,7 @@ function f21<T extends number | string>(x: T, y: ZeroOf<T>) {
|
||||
}
|
||||
|
||||
type T35<T extends { a: string, b: number }> = T[];
|
||||
>T35 : T[]
|
||||
>T35 : T35<T>
|
||||
>a : string
|
||||
>b : number
|
||||
|
||||
|
||||
@@ -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 : <T, U, V>(x: T, y: U, cb: (x: T, y: U) => V) => V
|
||||
>"one" : "one"
|
||||
>1 : 1
|
||||
|
||||
@@ -124,17 +124,17 @@ app2({
|
||||
|
||||
|
||||
type ActionsArray<State> = ((state: State) => State)[];
|
||||
>ActionsArray : ((state: State) => State)[]
|
||||
>ActionsArray : ActionsArray<State>
|
||||
>state : State
|
||||
|
||||
declare function app3<State, Actions extends ActionsArray<State>>(obj: Options<State, Actions>): void;
|
||||
>app3 : <State, Actions extends ((state: State) => State)[]>(obj: Options<State, Actions>) => void
|
||||
>app3 : <State, Actions extends ActionsArray<State>>(obj: Options<State, Actions>) => void
|
||||
>obj : Options<State, Actions>
|
||||
|
||||
app3({
|
||||
>app3({ state: 100, actions: [ s => s // Should be typed number => number ], view: (s, a) => undefined as any,}) : void
|
||||
>app3 : <State, Actions extends ((state: State) => State)[]>(obj: Options<State, Actions>) => 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 : <State, Actions extends ActionsArray<State>>(obj: Options<State, Actions>) => 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<State>) => 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<State>) => any
|
||||
>(s, a) => undefined as any : (s: number, a: ActionsArray<State>) => any
|
||||
>s : number
|
||||
>a : ((state: number) => number)[]
|
||||
>a : ActionsArray<State>
|
||||
>undefined as any : any
|
||||
>undefined : undefined
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class C1 {
|
||||
}
|
||||
|
||||
type TupleType1 =[string, number, boolean];
|
||||
>TupleType1 : [string, number, boolean]
|
||||
>TupleType1 : TupleType1
|
||||
|
||||
class C2 {
|
||||
>C2 : C2
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,7 +10,7 @@ class C1 {
|
||||
}
|
||||
|
||||
type TupleType1 = [string, number, boolean];
|
||||
>TupleType1 : [string, number, boolean]
|
||||
>TupleType1 : TupleType1
|
||||
|
||||
class C2 {
|
||||
>C2 : C2
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<T> {}
|
||||
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<T> {}
|
||||
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<T6>
|
||||
~~
|
||||
!!! error TS2456: Type alias 'T8' circularly references itself.
|
||||
|
||||
// legal cases
|
||||
type T9 = () => T9
|
||||
|
||||
@@ -27,40 +27,40 @@ class C<T> {}
|
||||
>C : C<T>
|
||||
|
||||
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<T> {}
|
||||
>C1 : C1<T>
|
||||
|
||||
type T6 = T7 | number
|
||||
>T6 : any
|
||||
>T6 : T6
|
||||
|
||||
type T7 = typeof yy
|
||||
>T7 : any
|
||||
>yy : any
|
||||
>T7 : [string, C<T6>[]]
|
||||
>yy : [string, C<T6>[]]
|
||||
|
||||
var yy: [string, T8[]];
|
||||
>yy : any
|
||||
>yy : [string, C<T6>[]]
|
||||
|
||||
type T8 = C<T6>
|
||||
>T8 : any
|
||||
>T8 : C<T6>
|
||||
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class B {
|
||||
}
|
||||
|
||||
type X<T extends A> = [T["a"], (T | B)["a"]];
|
||||
>X : [T["a"], (B | T)["a"]]
|
||||
>X : X<T>
|
||||
|
||||
type Y<T extends A | B> = T["a"];
|
||||
>Y : T["a"]
|
||||
|
||||
@@ -269,19 +269,19 @@ type T78<T> = T extends T76<infer X, infer X> ? T76<X, X> : never;
|
||||
>T78 : T78<T>
|
||||
|
||||
type Foo<T extends string, U extends T> = [T, U];
|
||||
>Foo : [T, U]
|
||||
>Foo : Foo<T, U>
|
||||
|
||||
type Bar<T> = T extends Foo<infer X, infer Y> ? Foo<X, Y> : never;
|
||||
>Bar : Bar<T>
|
||||
|
||||
type T90 = Bar<[string, string]>; // [string, string]
|
||||
>T90 : [string, string]
|
||||
>T90 : Foo<X, Y>
|
||||
|
||||
type T91 = Bar<[string, "a"]>; // [string, "a"]
|
||||
>T91 : [string, "a"]
|
||||
>T91 : Foo<X, Y>
|
||||
|
||||
type T92 = Bar<[string, "a"] & { x: string }>; // [string, "a"]
|
||||
>T92 : [string, "a"]
|
||||
>T92 : Foo<X, Y>
|
||||
>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 extends A1<any, any>> = [T, U];
|
||||
>A1 : [T, U]
|
||||
>A1 : A1<T, U>
|
||||
|
||||
type B1<S> = S extends A1<infer T, infer U> ? [T, U] : never;
|
||||
>B1 : B1<S>
|
||||
|
||||
type A2<T, U extends void> = [T, U];
|
||||
>A2 : [T, U]
|
||||
>A2 : A2<T, U>
|
||||
|
||||
type B2<S> = S extends A2<infer T, infer U> ? [T, U] : never;
|
||||
>B2 : B2<S>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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) {
|
||||
|
||||
@@ -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 : <U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]
|
||||
>point : [number, number]
|
||||
>point : Point
|
||||
>map : <U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]
|
||||
>d => d + 1 : (d: number) => number
|
||||
>d : number
|
||||
|
||||
@@ -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'.
|
||||
|
||||
@@ -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
|
||||
>[] : []
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts ===
|
||||
type T10 = string[];
|
||||
>T10 : string[]
|
||||
>T10 : T10
|
||||
|
||||
type T11 = Array<string>;
|
||||
>T11 : string[]
|
||||
@@ -12,7 +12,7 @@ type T13 = ReadonlyArray<string>;
|
||||
>T13 : readonly string[]
|
||||
|
||||
type T20 = [number, number];
|
||||
>T20 : [number, number]
|
||||
>T20 : T20
|
||||
|
||||
type T21 = readonly [number, number];
|
||||
>T21 : readonly [number, number]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts ===
|
||||
type T10 = string[];
|
||||
>T10 : string[]
|
||||
>T10 : T10
|
||||
|
||||
type T11 = Array<string>;
|
||||
>T11 : string[]
|
||||
@@ -12,7 +12,7 @@ type T13 = ReadonlyArray<string>;
|
||||
>T13 : readonly string[]
|
||||
|
||||
type T20 = [number, number];
|
||||
>T20 : [number, number]
|
||||
>T20 : T20
|
||||
|
||||
type T21 = readonly [number, number];
|
||||
>T21 : readonly [number, number]
|
||||
|
||||
@@ -25,10 +25,10 @@ export type Circular<T> = {[P in keyof T]: Circular<T>};
|
||||
>Circular : Circular<T>
|
||||
|
||||
type tup = [number, number, number, number];
|
||||
>tup : [number, number, number, number]
|
||||
>tup : tup
|
||||
|
||||
function foo(arg: Circular<tup>): tup {
|
||||
>foo : (arg: any) => [number, number, number, number]
|
||||
>foo : (arg: any) => tup
|
||||
>arg : any
|
||||
|
||||
return arg;
|
||||
@@ -44,10 +44,10 @@ type DeepMap<T extends unknown[], R> = {
|
||||
};
|
||||
|
||||
type tpl = [string, [string, [string]]];
|
||||
>tpl : [string, [string, [string]]]
|
||||
>tpl : tpl
|
||||
|
||||
type arr = string[][];
|
||||
>arr : string[][]
|
||||
>arr : arr
|
||||
|
||||
type t1 = DeepMap<tpl, number>; // [number, [number, [number]]]
|
||||
>t1 : [number, [number, [number]]]
|
||||
|
||||
@@ -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<L extends any[], U = (...args: L) => void> =
|
||||
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2577: Return type annotation circularly references itself.
|
||||
!!! error TS2589: Type instantiation is excessively deep and possibly infinite.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'H'.
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -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<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<any>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]', 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<typeof f3>[];
|
||||
~~
|
||||
!!! 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<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<any>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]', 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
|
||||
|
||||
@@ -37,11 +37,11 @@ var f2: any;
|
||||
>f2 : any
|
||||
|
||||
var f3: Foo<typeof f3>[];
|
||||
>f3 : any
|
||||
>f3 : any
|
||||
>f3 : Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<any>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]
|
||||
>f3 : Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<any>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]
|
||||
|
||||
var f3: any;
|
||||
>f3 : any
|
||||
>f3 : Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<Foo<any>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]>[]
|
||||
|
||||
// None of these declarations should have any errors!
|
||||
// Truly recursive 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 : <T, S extends T>() => 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<T, U>(x: [T, ...U[]]): [T, U];
|
||||
|
||||
+33
-33
@@ -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
|
||||
|
||||
+53
-53
@@ -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] = <Robot>[2, "trimmer", "trimming"], i = 0; i < 1; i++) {
|
||||
>[numberA3, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"], i = 0 : 0
|
||||
>[numberA3, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>[numberA3, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : Robot
|
||||
>[numberA3, ...robotAInfo] : [number, ...(string | number)[]]
|
||||
>numberA3 : number
|
||||
>...robotAInfo : string | number
|
||||
>robotAInfo : (string | number)[]
|
||||
><Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
><Robot>[2, "trimmer", "trimming"] : Robot
|
||||
>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>2 : 2
|
||||
>"trimmer" : "trimmer"
|
||||
@@ -604,11 +604,11 @@ for ([numberA3, ...robotAInfo] = <Robot>[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] = <MultiSkilledRobot>["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) {
|
||||
>[...multiRobotAInfo] = <MultiSkilledRobot>["trimmer", ["trimming", "edging"]], i = 0 : 0
|
||||
>[...multiRobotAInfo] = <MultiSkilledRobot>["trimmer", ["trimming", "edging"]] : [string, [string, string]]
|
||||
>[...multiRobotAInfo] = <MultiSkilledRobot>["trimmer", ["trimming", "edging"]] : MultiSkilledRobot
|
||||
>[...multiRobotAInfo] : (string | [string, string])[]
|
||||
>...multiRobotAInfo : string | [string, string]
|
||||
>multiRobotAInfo : (string | [string, string])[]
|
||||
><MultiSkilledRobot>["trimmer", ["trimming", "edging"]] : [string, [string, string]]
|
||||
><MultiSkilledRobot>["trimmer", ["trimming", "edging"]] : MultiSkilledRobot
|
||||
>["trimmer", ["trimming", "edging"]] : [string, [string, string]]
|
||||
>"trimmer" : "trimmer"
|
||||
>["trimming", "edging"] : [string, string]
|
||||
|
||||
+30
-30
@@ -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
|
||||
|
||||
+45
-45
@@ -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] = <Robot>[2, "trimmer", "trimming"], i = 0; i < 1; i++) {
|
||||
>[numberA3 = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"], i = 0 : 0
|
||||
>[numberA3 = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>[numberA3 = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : Robot
|
||||
>[numberA3 = -1, ...robotAInfo] : [number, ...(string | number)[]]
|
||||
>numberA3 = -1 : -1
|
||||
>numberA3 : number
|
||||
@@ -725,7 +725,7 @@ for ([numberA3 = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"], i = 0;
|
||||
>1 : 1
|
||||
>...robotAInfo : string | number
|
||||
>robotAInfo : (string | number)[]
|
||||
><Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
><Robot>[2, "trimmer", "trimming"] : Robot
|
||||
>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>2 : 2
|
||||
>"trimmer" : "trimmer"
|
||||
|
||||
+66
-66
@@ -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
|
||||
|
||||
+66
-66
@@ -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
|
||||
|
||||
+60
-60
@@ -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
|
||||
|
||||
+60
-60
@@ -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
|
||||
|
||||
+18
-18
@@ -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"
|
||||
|
||||
+18
-18
@@ -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]
|
||||
|
||||
+18
-18
@@ -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"
|
||||
|
||||
+14
-14
@@ -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[]
|
||||
|
||||
+7
-7
@@ -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
|
||||
|
||||
+7
-7
@@ -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
|
||||
|
||||
+52
-52
@@ -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] = <Robot>[2, "trimmer", "trimming"];
|
||||
>[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : Robot
|
||||
>[numberB, ...robotAInfo] : [number, ...(string | number)[]]
|
||||
>numberB : number
|
||||
>...robotAInfo : string | number
|
||||
>robotAInfo : (string | number)[]
|
||||
><Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
><Robot>[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
|
||||
}
|
||||
|
||||
+7
-7
@@ -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
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
+47
-47
@@ -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] = <Robot>[2, "trimmer", "trimming"];
|
||||
>[numberB = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
>[numberB = -1, ...robotAInfo] = <Robot>[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)[]
|
||||
><Robot>[2, "trimmer", "trimming"] : [number, string, string]
|
||||
><Robot>[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
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ type ErrorMsg<INPUT> =
|
||||
>field : string
|
||||
|
||||
export type Spec<INPUT, ROOTINPUT = any> = [Predicate<INPUT, ROOTINPUT>, ErrorMsg<INPUT>];
|
||||
>Spec : [Predicate<INPUT, ROOTINPUT>, ErrorMsg<INPUT>]
|
||||
>Spec : Spec<INPUT, ROOTINPUT>
|
||||
|
||||
export type SpecArray<INPUT, ROOTINPUT = any> = Array<Spec<INPUT, ROOTINPUT>>;
|
||||
>SpecArray : [Predicate<INPUT, ROOTINPUT>, ErrorMsg<INPUT>][]
|
||||
>SpecArray : Spec<INPUT, ROOTINPUT>[]
|
||||
|
||||
export type SpecFunction<INPUT, ROOTINPUT = any> = [INPUT] extends [ReadonlyArray<infer U>]
|
||||
>SpecFunction : SpecFunction<INPUT, ROOTINPUT>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ function f4<T extends number | { [key: string]: any }>(arg: T) {
|
||||
}
|
||||
|
||||
function f5<T extends string[] | { [key: string]: any }>(arg: T) {
|
||||
>f5 : <T extends string[] | { [key: string]: any; }>(arg: T) => T
|
||||
>f5 : <T extends { [key: string]: any; } | string[]>(arg: T) => T
|
||||
>key : string
|
||||
>arg : T
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -56,11 +56,11 @@ export function extent<T extends Numeric>(array: Array<T | Primitive>): [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 : <T extends Numeric>(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)[]
|
||||
|
||||
@@ -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<T>(value: T | { data: T}): value is { data: T } {
|
||||
>isResponseInData : <T>(value: T | { data: T; }) => value is { data: T; }
|
||||
@@ -47,19 +47,19 @@ function isResponseInData<T>(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 : <T>(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<T>(value: T | { data: T}): value is T {
|
||||
@@ -77,17 +77,17 @@ function isPlainResponse<T>(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 : <T>(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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user