mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Update baselines
This commit is contained in:
parent
ac20b46f4f
commit
9d4ddb68c7
67
tests/baselines/reference/objectRest.js
Normal file
67
tests/baselines/reference/objectRest.js
Normal file
@ -0,0 +1,67 @@
|
||||
//// [objectRest.ts]
|
||||
let o = { a: 1, b: 'no' }
|
||||
var { ...clone } = o;
|
||||
var { a, ...justB } = o;
|
||||
var { a, b: renamed, ...empty } = o;
|
||||
var { ['b']: renamed, ...justA } = o;
|
||||
var { 'b': renamed, ...justA } = o;
|
||||
var { b: { '0': n, '1': oooo }, ...justA } = o;
|
||||
|
||||
let o2 = { c: 'terrible idea?', d: 'yes' };
|
||||
var { d: renamed, ...d } = o2;
|
||||
|
||||
let nestedrest: { x: number, n1: { y: number, n2: { z: number, n3: { n4: number } } }, rest: number, restrest: number };
|
||||
var { x, n1: { y, n2: { z, n3: { ...nr } } }, ...restrest } = nestedrest;
|
||||
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
var { x: { ka, ...nested }, y: other, ...rest } = complex;
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
var { x, ...fresh } = { x: 1, y: 2 };
|
||||
({ x, ...fresh } = { x: 1, y: 2 });
|
||||
|
||||
class Removable {
|
||||
private x: number;
|
||||
protected y: number;
|
||||
set z(value: number) { }
|
||||
get both(): number { return 12 }
|
||||
set both(value: number) { }
|
||||
m() { }
|
||||
removed: string;
|
||||
remainder: string;
|
||||
}
|
||||
var removable = new Removable();
|
||||
var { removed, ...removableRest } = removable;
|
||||
|
||||
|
||||
//// [objectRest.js]
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
|
||||
t[p] = s[p];
|
||||
return t;
|
||||
};
|
||||
let o = { a: 1, b: 'no' };
|
||||
var clone = __rest(o, []);
|
||||
var { a } = o, justB = __rest(o, ["a"]);
|
||||
var { a, b: renamed } = o, empty = __rest(o, ["a", "b"]);
|
||||
var { ['b']: renamed } = o, justA = __rest(o, ["b"]);
|
||||
var { 'b': renamed } = o, justA = __rest(o, ["b"]);
|
||||
var { b: { '0': n, '1': oooo } } = o, justA = __rest(o, ["b"]);
|
||||
let o2 = { c: 'terrible idea?', d: 'yes' };
|
||||
var { d: renamed } = o2, d = __rest(o2, ["d"]);
|
||||
let nestedrest;
|
||||
var { x } = nestedrest, _a = nestedrest.n1, { y } = _a, _b = _a.n2, { z } = _b, nr = __rest(_b.n3, []), restrest = __rest(nestedrest, ["x", "n1"]);
|
||||
let complex;
|
||||
var _c = complex.x, { ka } = _c, nested = __rest(_c, ["ka"]), { y: other } = complex, rest = __rest(complex, ["x", "y"]);
|
||||
(_d = complex.x, { ka } = _d, nested = __rest(_d, ["ka"]), { y: other } = complex, rest = __rest(complex, ["x", "y"]), complex);
|
||||
var _e = { x: 1, y: 2 }, { x } = _e, fresh = __rest(_e, ["x"]);
|
||||
(_f = { x: 1, y: 2 }, { x } = _f, fresh = __rest(_f, ["x"]), _f);
|
||||
class Removable {
|
||||
set z(value) { }
|
||||
get both() { return 12; }
|
||||
set both(value) { }
|
||||
m() { }
|
||||
}
|
||||
var removable = new Removable();
|
||||
var { removed } = removable, removableRest = __rest(removable, ["removed"]);
|
||||
var _d, _f;
|
||||
146
tests/baselines/reference/objectRest.symbols
Normal file
146
tests/baselines/reference/objectRest.symbols
Normal file
@ -0,0 +1,146 @@
|
||||
=== tests/cases/conformance/types/rest/objectRest.ts ===
|
||||
let o = { a: 1, b: 'no' }
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
>a : Symbol(a, Decl(objectRest.ts, 0, 9))
|
||||
>b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
||||
|
||||
var { ...clone } = o;
|
||||
>clone : Symbol(clone, Decl(objectRest.ts, 1, 5))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
var { a, ...justB } = o;
|
||||
>a : Symbol(a, Decl(objectRest.ts, 2, 5), Decl(objectRest.ts, 3, 5))
|
||||
>justB : Symbol(justB, Decl(objectRest.ts, 2, 8))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
var { a, b: renamed, ...empty } = o;
|
||||
>a : Symbol(a, Decl(objectRest.ts, 2, 5), Decl(objectRest.ts, 3, 5))
|
||||
>b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
||||
>renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
||||
>empty : Symbol(empty, Decl(objectRest.ts, 3, 20))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
var { ['b']: renamed, ...justA } = o;
|
||||
>'b' : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
||||
>renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
||||
>justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
var { 'b': renamed, ...justA } = o;
|
||||
>renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
||||
>justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
var { b: { '0': n, '1': oooo }, ...justA } = o;
|
||||
>b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
||||
>n : Symbol(n, Decl(objectRest.ts, 6, 10))
|
||||
>oooo : Symbol(oooo, Decl(objectRest.ts, 6, 18))
|
||||
>justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
||||
>o : Symbol(o, Decl(objectRest.ts, 0, 3))
|
||||
|
||||
let o2 = { c: 'terrible idea?', d: 'yes' };
|
||||
>o2 : Symbol(o2, Decl(objectRest.ts, 8, 3))
|
||||
>c : Symbol(c, Decl(objectRest.ts, 8, 10))
|
||||
>d : Symbol(d, Decl(objectRest.ts, 8, 31))
|
||||
|
||||
var { d: renamed, ...d } = o2;
|
||||
>d : Symbol(d, Decl(objectRest.ts, 8, 31))
|
||||
>renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
||||
>d : Symbol(d, Decl(objectRest.ts, 9, 17))
|
||||
>o2 : Symbol(o2, Decl(objectRest.ts, 8, 3))
|
||||
|
||||
let nestedrest: { x: number, n1: { y: number, n2: { z: number, n3: { n4: number } } }, rest: number, restrest: number };
|
||||
>nestedrest : Symbol(nestedrest, Decl(objectRest.ts, 11, 3))
|
||||
>x : Symbol(x, Decl(objectRest.ts, 11, 17))
|
||||
>n1 : Symbol(n1, Decl(objectRest.ts, 11, 28))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 11, 34))
|
||||
>n2 : Symbol(n2, Decl(objectRest.ts, 11, 45))
|
||||
>z : Symbol(z, Decl(objectRest.ts, 11, 51))
|
||||
>n3 : Symbol(n3, Decl(objectRest.ts, 11, 62))
|
||||
>n4 : Symbol(n4, Decl(objectRest.ts, 11, 68))
|
||||
>rest : Symbol(rest, Decl(objectRest.ts, 11, 86))
|
||||
>restrest : Symbol(restrest, Decl(objectRest.ts, 11, 100))
|
||||
|
||||
var { x, n1: { y, n2: { z, n3: { ...nr } } }, ...restrest } = nestedrest;
|
||||
>x : Symbol(x, Decl(objectRest.ts, 12, 5), Decl(objectRest.ts, 17, 5))
|
||||
>n1 : Symbol(n1, Decl(objectRest.ts, 11, 28))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 12, 14))
|
||||
>n2 : Symbol(n2, Decl(objectRest.ts, 11, 45))
|
||||
>z : Symbol(z, Decl(objectRest.ts, 12, 23))
|
||||
>n3 : Symbol(n3, Decl(objectRest.ts, 11, 62))
|
||||
>nr : Symbol(nr, Decl(objectRest.ts, 12, 32))
|
||||
>restrest : Symbol(restrest, Decl(objectRest.ts, 12, 45))
|
||||
>nestedrest : Symbol(nestedrest, Decl(objectRest.ts, 11, 3))
|
||||
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
>complex : Symbol(complex, Decl(objectRest.ts, 14, 3))
|
||||
>x : Symbol(x, Decl(objectRest.ts, 14, 14))
|
||||
>ka : Symbol(ka, Decl(objectRest.ts, 14, 19))
|
||||
>ki : Symbol(ki, Decl(objectRest.ts, 14, 23))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 14, 29))
|
||||
|
||||
var { x: { ka, ...nested }, y: other, ...rest } = complex;
|
||||
>x : Symbol(x, Decl(objectRest.ts, 14, 14))
|
||||
>ka : Symbol(ka, Decl(objectRest.ts, 15, 10))
|
||||
>nested : Symbol(nested, Decl(objectRest.ts, 15, 14))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 14, 29))
|
||||
>other : Symbol(other, Decl(objectRest.ts, 15, 27))
|
||||
>rest : Symbol(rest, Decl(objectRest.ts, 15, 37))
|
||||
>complex : Symbol(complex, Decl(objectRest.ts, 14, 3))
|
||||
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
>x : Symbol(x, Decl(objectRest.ts, 16, 2))
|
||||
>ka : Symbol(ka, Decl(objectRest.ts, 16, 6))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 16, 23))
|
||||
>other : Symbol(other, Decl(objectRest.ts, 15, 27))
|
||||
>complex : Symbol(complex, Decl(objectRest.ts, 14, 3))
|
||||
|
||||
var { x, ...fresh } = { x: 1, y: 2 };
|
||||
>x : Symbol(x, Decl(objectRest.ts, 12, 5), Decl(objectRest.ts, 17, 5))
|
||||
>fresh : Symbol(fresh, Decl(objectRest.ts, 17, 8))
|
||||
>x : Symbol(x, Decl(objectRest.ts, 17, 23))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 17, 29))
|
||||
|
||||
({ x, ...fresh } = { x: 1, y: 2 });
|
||||
>x : Symbol(x, Decl(objectRest.ts, 18, 2))
|
||||
>x : Symbol(x, Decl(objectRest.ts, 18, 20))
|
||||
>y : Symbol(y, Decl(objectRest.ts, 18, 26))
|
||||
|
||||
class Removable {
|
||||
>Removable : Symbol(Removable, Decl(objectRest.ts, 18, 35))
|
||||
|
||||
private x: number;
|
||||
>x : Symbol(Removable.x, Decl(objectRest.ts, 20, 17))
|
||||
|
||||
protected y: number;
|
||||
>y : Symbol(Removable.y, Decl(objectRest.ts, 21, 22))
|
||||
|
||||
set z(value: number) { }
|
||||
>z : Symbol(Removable.z, Decl(objectRest.ts, 22, 24))
|
||||
>value : Symbol(value, Decl(objectRest.ts, 23, 10))
|
||||
|
||||
get both(): number { return 12 }
|
||||
>both : Symbol(Removable.both, Decl(objectRest.ts, 23, 28), Decl(objectRest.ts, 24, 36))
|
||||
|
||||
set both(value: number) { }
|
||||
>both : Symbol(Removable.both, Decl(objectRest.ts, 23, 28), Decl(objectRest.ts, 24, 36))
|
||||
>value : Symbol(value, Decl(objectRest.ts, 25, 13))
|
||||
|
||||
m() { }
|
||||
>m : Symbol(Removable.m, Decl(objectRest.ts, 25, 31))
|
||||
|
||||
removed: string;
|
||||
>removed : Symbol(Removable.removed, Decl(objectRest.ts, 26, 11))
|
||||
|
||||
remainder: string;
|
||||
>remainder : Symbol(Removable.remainder, Decl(objectRest.ts, 27, 20))
|
||||
}
|
||||
var removable = new Removable();
|
||||
>removable : Symbol(removable, Decl(objectRest.ts, 30, 3))
|
||||
>Removable : Symbol(Removable, Decl(objectRest.ts, 18, 35))
|
||||
|
||||
var { removed, ...removableRest } = removable;
|
||||
>removed : Symbol(removed, Decl(objectRest.ts, 31, 5))
|
||||
>removableRest : Symbol(removableRest, Decl(objectRest.ts, 31, 14))
|
||||
>removable : Symbol(removable, Decl(objectRest.ts, 30, 3))
|
||||
|
||||
170
tests/baselines/reference/objectRest.types
Normal file
170
tests/baselines/reference/objectRest.types
Normal file
@ -0,0 +1,170 @@
|
||||
=== tests/cases/conformance/types/rest/objectRest.ts ===
|
||||
let o = { a: 1, b: 'no' }
|
||||
>o : { a: number; b: string; }
|
||||
>{ a: 1, b: 'no' } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>'no' : "no"
|
||||
|
||||
var { ...clone } = o;
|
||||
>clone : { a: number; b: string; }
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
var { a, ...justB } = o;
|
||||
>a : number
|
||||
>justB : { b: string; }
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
var { a, b: renamed, ...empty } = o;
|
||||
>a : number
|
||||
>b : any
|
||||
>renamed : string
|
||||
>empty : {}
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
var { ['b']: renamed, ...justA } = o;
|
||||
>'b' : "b"
|
||||
>renamed : string
|
||||
>justA : { a: number; }
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
var { 'b': renamed, ...justA } = o;
|
||||
>renamed : string
|
||||
>justA : { a: number; }
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
var { b: { '0': n, '1': oooo }, ...justA } = o;
|
||||
>b : any
|
||||
>n : string
|
||||
>oooo : string
|
||||
>justA : { a: number; }
|
||||
>o : { a: number; b: string; }
|
||||
|
||||
let o2 = { c: 'terrible idea?', d: 'yes' };
|
||||
>o2 : { c: string; d: string; }
|
||||
>{ c: 'terrible idea?', d: 'yes' } : { c: string; d: string; }
|
||||
>c : string
|
||||
>'terrible idea?' : "terrible idea?"
|
||||
>d : string
|
||||
>'yes' : "yes"
|
||||
|
||||
var { d: renamed, ...d } = o2;
|
||||
>d : any
|
||||
>renamed : string
|
||||
>d : { c: string; }
|
||||
>o2 : { c: string; d: string; }
|
||||
|
||||
let nestedrest: { x: number, n1: { y: number, n2: { z: number, n3: { n4: number } } }, rest: number, restrest: number };
|
||||
>nestedrest : { x: number; n1: { y: number; n2: { z: number; n3: { n4: number; }; }; }; rest: number; restrest: number; }
|
||||
>x : number
|
||||
>n1 : { y: number; n2: { z: number; n3: { n4: number; }; }; }
|
||||
>y : number
|
||||
>n2 : { z: number; n3: { n4: number; }; }
|
||||
>z : number
|
||||
>n3 : { n4: number; }
|
||||
>n4 : number
|
||||
>rest : number
|
||||
>restrest : number
|
||||
|
||||
var { x, n1: { y, n2: { z, n3: { ...nr } } }, ...restrest } = nestedrest;
|
||||
>x : number
|
||||
>n1 : any
|
||||
>y : number
|
||||
>n2 : any
|
||||
>z : number
|
||||
>n3 : any
|
||||
>nr : { n4: number; }
|
||||
>restrest : { rest: number; restrest: number; }
|
||||
>nestedrest : { x: number; n1: { y: number; n2: { z: number; n3: { n4: number; }; }; }; rest: number; restrest: number; }
|
||||
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
>complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
>x : { ka: any; ki: any; }
|
||||
>ka : any
|
||||
>ki : any
|
||||
>y : number
|
||||
|
||||
var { x: { ka, ...nested }, y: other, ...rest } = complex;
|
||||
>x : any
|
||||
>ka : any
|
||||
>nested : { ki: any; }
|
||||
>y : any
|
||||
>other : number
|
||||
>rest : {}
|
||||
>complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
>({x: { ka, ...nested }, y: other, ...rest} = complex) : { x: { ka: any; ki: any; }; y: number; }
|
||||
>{x: { ka, ...nested }, y: other, ...rest} = complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
>{x: { ka, ...nested }, y: other, ...rest} : { x: { ki: any; ka: any; }; y: number; }
|
||||
>x : { ki: any; ka: any; }
|
||||
>{ ka, ...nested } : { ki: any; ka: any; }
|
||||
>ka : any
|
||||
>nested : any
|
||||
>y : number
|
||||
>other : number
|
||||
>rest : any
|
||||
>complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
|
||||
var { x, ...fresh } = { x: 1, y: 2 };
|
||||
>x : number
|
||||
>fresh : { y: number; }
|
||||
>{ x: 1, y: 2 } : { x: number; y: number; }
|
||||
>x : number
|
||||
>1 : 1
|
||||
>y : number
|
||||
>2 : 2
|
||||
|
||||
({ x, ...fresh } = { x: 1, y: 2 });
|
||||
>({ x, ...fresh } = { x: 1, y: 2 }) : { x: number; y: number; }
|
||||
>{ x, ...fresh } = { x: 1, y: 2 } : { x: number; y: number; }
|
||||
>{ x, ...fresh } : { y: number; x: number; }
|
||||
>x : number
|
||||
>fresh : any
|
||||
>{ x: 1, y: 2 } : { x: number; y: number; }
|
||||
>x : number
|
||||
>1 : 1
|
||||
>y : number
|
||||
>2 : 2
|
||||
|
||||
class Removable {
|
||||
>Removable : Removable
|
||||
|
||||
private x: number;
|
||||
>x : number
|
||||
|
||||
protected y: number;
|
||||
>y : number
|
||||
|
||||
set z(value: number) { }
|
||||
>z : number
|
||||
>value : number
|
||||
|
||||
get both(): number { return 12 }
|
||||
>both : number
|
||||
>12 : 12
|
||||
|
||||
set both(value: number) { }
|
||||
>both : number
|
||||
>value : number
|
||||
|
||||
m() { }
|
||||
>m : () => void
|
||||
|
||||
removed: string;
|
||||
>removed : string
|
||||
|
||||
remainder: string;
|
||||
>remainder : string
|
||||
}
|
||||
var removable = new Removable();
|
||||
>removable : Removable
|
||||
>new Removable() : Removable
|
||||
>Removable : typeof Removable
|
||||
|
||||
var { removed, ...removableRest } = removable;
|
||||
>removed : string
|
||||
>removableRest : { both: number; remainder: string; }
|
||||
>removable : Removable
|
||||
|
||||
25
tests/baselines/reference/objectRestAssignment.js
Normal file
25
tests/baselines/reference/objectRestAssignment.js
Normal file
@ -0,0 +1,25 @@
|
||||
//// [objectRestAssignment.ts]
|
||||
let x;
|
||||
let ka;
|
||||
let nested;
|
||||
let other;
|
||||
let rest;
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
|
||||
|
||||
//// [objectRestAssignment.js]
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
|
||||
t[p] = s[p];
|
||||
return t;
|
||||
};
|
||||
var x;
|
||||
var ka;
|
||||
var nested;
|
||||
var other;
|
||||
var rest;
|
||||
var complex;
|
||||
(_a = complex.x, (ka = _a.ka, _a), nested = __rest(_a, ["ka"]), (other = complex.y, complex), rest = __rest(complex, ["x", "y"]), complex);
|
||||
var _a;
|
||||
30
tests/baselines/reference/objectRestAssignment.symbols
Normal file
30
tests/baselines/reference/objectRestAssignment.symbols
Normal file
@ -0,0 +1,30 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestAssignment.ts ===
|
||||
let x;
|
||||
>x : Symbol(x, Decl(objectRestAssignment.ts, 0, 3))
|
||||
|
||||
let ka;
|
||||
>ka : Symbol(ka, Decl(objectRestAssignment.ts, 1, 3))
|
||||
|
||||
let nested;
|
||||
>nested : Symbol(nested, Decl(objectRestAssignment.ts, 2, 3))
|
||||
|
||||
let other;
|
||||
>other : Symbol(other, Decl(objectRestAssignment.ts, 3, 3))
|
||||
|
||||
let rest;
|
||||
>rest : Symbol(rest, Decl(objectRestAssignment.ts, 4, 3))
|
||||
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
>complex : Symbol(complex, Decl(objectRestAssignment.ts, 5, 3))
|
||||
>x : Symbol(x, Decl(objectRestAssignment.ts, 5, 14))
|
||||
>ka : Symbol(ka, Decl(objectRestAssignment.ts, 5, 19))
|
||||
>ki : Symbol(ki, Decl(objectRestAssignment.ts, 5, 23))
|
||||
>y : Symbol(y, Decl(objectRestAssignment.ts, 5, 29))
|
||||
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
>x : Symbol(x, Decl(objectRestAssignment.ts, 6, 2))
|
||||
>ka : Symbol(ka, Decl(objectRestAssignment.ts, 6, 6))
|
||||
>y : Symbol(y, Decl(objectRestAssignment.ts, 6, 23))
|
||||
>other : Symbol(other, Decl(objectRestAssignment.ts, 3, 3))
|
||||
>complex : Symbol(complex, Decl(objectRestAssignment.ts, 5, 3))
|
||||
|
||||
36
tests/baselines/reference/objectRestAssignment.types
Normal file
36
tests/baselines/reference/objectRestAssignment.types
Normal file
@ -0,0 +1,36 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestAssignment.ts ===
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
let ka;
|
||||
>ka : any
|
||||
|
||||
let nested;
|
||||
>nested : any
|
||||
|
||||
let other;
|
||||
>other : any
|
||||
|
||||
let rest;
|
||||
>rest : any
|
||||
|
||||
let complex: { x: { ka, ki }, y: number };
|
||||
>complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
>x : { ka: any; ki: any; }
|
||||
>ka : any
|
||||
>ki : any
|
||||
>y : number
|
||||
|
||||
({x: { ka, ...nested }, y: other, ...rest} = complex);
|
||||
>({x: { ka, ...nested }, y: other, ...rest} = complex) : { x: { ka: any; ki: any; }; y: number; }
|
||||
>{x: { ka, ...nested }, y: other, ...rest} = complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
>{x: { ka, ...nested }, y: other, ...rest} : { x: { ka: any; }; y: any; }
|
||||
>x : { ka: any; }
|
||||
>{ ka, ...nested } : { ka: any; }
|
||||
>ka : any
|
||||
>nested : any
|
||||
>y : any
|
||||
>other : any
|
||||
>rest : any
|
||||
>complex : { x: { ka: any; ki: any; }; y: number; }
|
||||
|
||||
45
tests/baselines/reference/objectRestForOf.js
Normal file
45
tests/baselines/reference/objectRestForOf.js
Normal file
@ -0,0 +1,45 @@
|
||||
//// [objectRestForOf.ts]
|
||||
let array: { x: number, y: string }[];
|
||||
for (let { x, ...restOf } of array) {
|
||||
[x, restOf];
|
||||
}
|
||||
let xx: number;
|
||||
let rrestOff: { y: string };
|
||||
for ({ x: xx, ...rrestOff } of array ) {
|
||||
[xx, rrestOff];
|
||||
}
|
||||
for (const norest of array.map(a => ({ ...a, x: 'a string' }))) {
|
||||
[norest.x, norest.y];
|
||||
// x is now a string. who knows why.
|
||||
}
|
||||
|
||||
|
||||
//// [objectRestForOf.js]
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
|
||||
t[p] = s[p];
|
||||
return t;
|
||||
};
|
||||
let array;
|
||||
for (var _a of array) {
|
||||
var { x } = _a, restOf = __rest(_a, ["x"]);
|
||||
[x, restOf];
|
||||
}
|
||||
let xx;
|
||||
let rrestOff;
|
||||
for (var _b of array) {
|
||||
({ x: xx } = _b, rrestOff = __rest(_b, ["x"]));
|
||||
[xx, rrestOff];
|
||||
}
|
||||
for (const norest of array.map(a => (__assign({}, a, { x: 'a string' })))) {
|
||||
[norest.x, norest.y];
|
||||
}
|
||||
50
tests/baselines/reference/objectRestForOf.symbols
Normal file
50
tests/baselines/reference/objectRestForOf.symbols
Normal file
@ -0,0 +1,50 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestForOf.ts ===
|
||||
let array: { x: number, y: string }[];
|
||||
>array : Symbol(array, Decl(objectRestForOf.ts, 0, 3))
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 0, 12))
|
||||
>y : Symbol(y, Decl(objectRestForOf.ts, 0, 23))
|
||||
|
||||
for (let { x, ...restOf } of array) {
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 1, 10))
|
||||
>restOf : Symbol(restOf, Decl(objectRestForOf.ts, 1, 13))
|
||||
>array : Symbol(array, Decl(objectRestForOf.ts, 0, 3))
|
||||
|
||||
[x, restOf];
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 1, 10))
|
||||
>restOf : Symbol(restOf, Decl(objectRestForOf.ts, 1, 13))
|
||||
}
|
||||
let xx: number;
|
||||
>xx : Symbol(xx, Decl(objectRestForOf.ts, 4, 3))
|
||||
|
||||
let rrestOff: { y: string };
|
||||
>rrestOff : Symbol(rrestOff, Decl(objectRestForOf.ts, 5, 3))
|
||||
>y : Symbol(y, Decl(objectRestForOf.ts, 5, 15))
|
||||
|
||||
for ({ x: xx, ...rrestOff } of array ) {
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 6, 6))
|
||||
>xx : Symbol(xx, Decl(objectRestForOf.ts, 4, 3))
|
||||
>array : Symbol(array, Decl(objectRestForOf.ts, 0, 3))
|
||||
|
||||
[xx, rrestOff];
|
||||
>xx : Symbol(xx, Decl(objectRestForOf.ts, 4, 3))
|
||||
>rrestOff : Symbol(rrestOff, Decl(objectRestForOf.ts, 5, 3))
|
||||
}
|
||||
for (const norest of array.map(a => ({ ...a, x: 'a string' }))) {
|
||||
>norest : Symbol(norest, Decl(objectRestForOf.ts, 9, 10))
|
||||
>array.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>array : Symbol(array, Decl(objectRestForOf.ts, 0, 3))
|
||||
>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(objectRestForOf.ts, 9, 31))
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 9, 44))
|
||||
|
||||
[norest.x, norest.y];
|
||||
>norest.x : Symbol(x, Decl(objectRestForOf.ts, 9, 44))
|
||||
>norest : Symbol(norest, Decl(objectRestForOf.ts, 9, 10))
|
||||
>x : Symbol(x, Decl(objectRestForOf.ts, 9, 44))
|
||||
>norest.y : Symbol(y, Decl(objectRestForOf.ts, 0, 23))
|
||||
>norest : Symbol(norest, Decl(objectRestForOf.ts, 9, 10))
|
||||
>y : Symbol(y, Decl(objectRestForOf.ts, 0, 23))
|
||||
|
||||
// x is now a string. who knows why.
|
||||
}
|
||||
|
||||
61
tests/baselines/reference/objectRestForOf.types
Normal file
61
tests/baselines/reference/objectRestForOf.types
Normal file
@ -0,0 +1,61 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestForOf.ts ===
|
||||
let array: { x: number, y: string }[];
|
||||
>array : { x: number; y: string; }[]
|
||||
>x : number
|
||||
>y : string
|
||||
|
||||
for (let { x, ...restOf } of array) {
|
||||
>x : number
|
||||
>restOf : { y: string; }
|
||||
>array : { x: number; y: string; }[]
|
||||
|
||||
[x, restOf];
|
||||
>[x, restOf] : (number | { y: string; })[]
|
||||
>x : number
|
||||
>restOf : { y: string; }
|
||||
}
|
||||
let xx: number;
|
||||
>xx : number
|
||||
|
||||
let rrestOff: { y: string };
|
||||
>rrestOff : { y: string; }
|
||||
>y : string
|
||||
|
||||
for ({ x: xx, ...rrestOff } of array ) {
|
||||
>{ x: xx, ...rrestOff } : { y: string; x: number; }
|
||||
>x : { x: number; y: string; }
|
||||
>xx : number
|
||||
>rrestOff : any
|
||||
>array : { x: number; y: string; }[]
|
||||
|
||||
[xx, rrestOff];
|
||||
>[xx, rrestOff] : (number | { y: string; })[]
|
||||
>xx : number
|
||||
>rrestOff : { y: string; }
|
||||
}
|
||||
for (const norest of array.map(a => ({ ...a, x: 'a string' }))) {
|
||||
>norest : { x: string; y: string; }
|
||||
>array.map(a => ({ ...a, x: 'a string' })) : { x: string; y: string; }[]
|
||||
>array.map : { <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): U[]; }
|
||||
>array : { x: number; y: string; }[]
|
||||
>map : { <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): U[]; }
|
||||
>a => ({ ...a, x: 'a string' }) : (a: { x: number; y: string; }) => { x: string; y: string; }
|
||||
>a : { x: number; y: string; }
|
||||
>({ ...a, x: 'a string' }) : { x: string; y: string; }
|
||||
>{ ...a, x: 'a string' } : { x: string; y: string; }
|
||||
>a : any
|
||||
>x : string
|
||||
>'a string' : "a string"
|
||||
|
||||
[norest.x, norest.y];
|
||||
>[norest.x, norest.y] : string[]
|
||||
>norest.x : string
|
||||
>norest : { x: string; y: string; }
|
||||
>x : string
|
||||
>norest.y : string
|
||||
>norest : { x: string; y: string; }
|
||||
>y : string
|
||||
|
||||
// x is now a string. who knows why.
|
||||
}
|
||||
|
||||
21
tests/baselines/reference/objectRestNegative.errors.txt
Normal file
21
tests/baselines/reference/objectRestNegative.errors.txt
Normal file
@ -0,0 +1,21 @@
|
||||
tests/cases/conformance/types/rest/objectRestNegative.ts(2,10): error TS2462: A rest element must be last in a destructuring pattern
|
||||
tests/cases/conformance/types/rest/objectRestNegative.ts(3,31): error TS2462: A rest element must be last in a destructuring pattern
|
||||
tests/cases/conformance/types/rest/objectRestNegative.ts(6,17): error TS2700: Rest types may only be created from object types.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/rest/objectRestNegative.ts (3 errors) ====
|
||||
let o = { a: 1, b: 'no' };
|
||||
var { ...mustBeLast, a } = o;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2462: A rest element must be last in a destructuring pattern
|
||||
function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void {
|
||||
~~~~~~~~~~
|
||||
!!! error TS2462: A rest element must be last in a destructuring pattern
|
||||
}
|
||||
function generic<T extends { x, y }>(t: T) {
|
||||
let { x, ...rest } = t;
|
||||
~~~~
|
||||
!!! error TS2700: Rest types may only be created from object types.
|
||||
return rest;
|
||||
}
|
||||
|
||||
27
tests/baselines/reference/objectRestNegative.js
Normal file
27
tests/baselines/reference/objectRestNegative.js
Normal file
@ -0,0 +1,27 @@
|
||||
//// [objectRestNegative.ts]
|
||||
let o = { a: 1, b: 'no' };
|
||||
var { ...mustBeLast, a } = o;
|
||||
function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void {
|
||||
}
|
||||
function generic<T extends { x, y }>(t: T) {
|
||||
let { x, ...rest } = t;
|
||||
return rest;
|
||||
}
|
||||
|
||||
|
||||
//// [objectRestNegative.js]
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
|
||||
t[p] = s[p];
|
||||
return t;
|
||||
};
|
||||
var o = { a: 1, b: 'no' };
|
||||
var mustBeLast = o.mustBeLast, a = o.a;
|
||||
function stillMustBeLast(_a) {
|
||||
var mustBeLast = _a.mustBeLast, a = _a.a;
|
||||
}
|
||||
function generic(t) {
|
||||
var x = t.x, rest = __rest(t, ["x"]);
|
||||
return rest;
|
||||
}
|
||||
28
tests/baselines/reference/objectRestParameter.js
Normal file
28
tests/baselines/reference/objectRestParameter.js
Normal file
@ -0,0 +1,28 @@
|
||||
//// [objectRestParameter.ts]
|
||||
function cloneAgain({ a, ...clone }: { a: number, b: string }): void {
|
||||
}
|
||||
|
||||
declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void);
|
||||
suddenly(({ x: a, ...rest }) => rest.y);
|
||||
suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka);
|
||||
|
||||
|
||||
|
||||
//// [objectRestParameter.js]
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
|
||||
t[p] = s[p];
|
||||
return t;
|
||||
};
|
||||
function cloneAgain(_a) {
|
||||
var { a } = _a, clone = __rest(_a, ["a"]);
|
||||
}
|
||||
suddenly((_a) => {
|
||||
var { x: a } = _a, rest = __rest(_a, ["x"]);
|
||||
return rest.y;
|
||||
});
|
||||
suddenly((_a = { x: { z: 1, ka: 1 }, y: 'noo' }) => {
|
||||
var _b = _a.x, { z = 12 } = _b, nested = __rest(_b, ["z"]), rest = __rest(_a, ["x"]);
|
||||
return rest.y + nested.ka;
|
||||
});
|
||||
45
tests/baselines/reference/objectRestParameter.symbols
Normal file
45
tests/baselines/reference/objectRestParameter.symbols
Normal file
@ -0,0 +1,45 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestParameter.ts ===
|
||||
function cloneAgain({ a, ...clone }: { a: number, b: string }): void {
|
||||
>cloneAgain : Symbol(cloneAgain, Decl(objectRestParameter.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(objectRestParameter.ts, 0, 21))
|
||||
>clone : Symbol(clone, Decl(objectRestParameter.ts, 0, 24))
|
||||
>a : Symbol(a, Decl(objectRestParameter.ts, 0, 38))
|
||||
>b : Symbol(b, Decl(objectRestParameter.ts, 0, 49))
|
||||
}
|
||||
|
||||
declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void);
|
||||
>suddenly : Symbol(suddenly, Decl(objectRestParameter.ts, 1, 1))
|
||||
>f : Symbol(f, Decl(objectRestParameter.ts, 3, 26))
|
||||
>a : Symbol(a, Decl(objectRestParameter.ts, 3, 30))
|
||||
>x : Symbol(x, Decl(objectRestParameter.ts, 3, 34))
|
||||
>z : Symbol(z, Decl(objectRestParameter.ts, 3, 39))
|
||||
>ka : Symbol(ka, Decl(objectRestParameter.ts, 3, 42))
|
||||
>y : Symbol(y, Decl(objectRestParameter.ts, 3, 48))
|
||||
|
||||
suddenly(({ x: a, ...rest }) => rest.y);
|
||||
>suddenly : Symbol(suddenly, Decl(objectRestParameter.ts, 1, 1))
|
||||
>x : Symbol(x, Decl(objectRestParameter.ts, 3, 34))
|
||||
>a : Symbol(a, Decl(objectRestParameter.ts, 4, 11))
|
||||
>rest : Symbol(rest, Decl(objectRestParameter.ts, 4, 17))
|
||||
>rest.y : Symbol(y, Decl(objectRestParameter.ts, 3, 48))
|
||||
>rest : Symbol(rest, Decl(objectRestParameter.ts, 4, 17))
|
||||
>y : Symbol(y, Decl(objectRestParameter.ts, 3, 48))
|
||||
|
||||
suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka);
|
||||
>suddenly : Symbol(suddenly, Decl(objectRestParameter.ts, 1, 1))
|
||||
>x : Symbol(x, Decl(objectRestParameter.ts, 3, 34))
|
||||
>z : Symbol(z, Decl(objectRestParameter.ts, 5, 16))
|
||||
>nested : Symbol(nested, Decl(objectRestParameter.ts, 5, 24))
|
||||
>rest : Symbol(rest, Decl(objectRestParameter.ts, 5, 37))
|
||||
>x : Symbol(x, Decl(objectRestParameter.ts, 5, 51))
|
||||
>z : Symbol(z, Decl(objectRestParameter.ts, 5, 56))
|
||||
>ka : Symbol(ka, Decl(objectRestParameter.ts, 5, 62))
|
||||
>y : Symbol(y, Decl(objectRestParameter.ts, 5, 71))
|
||||
>rest.y : Symbol(y, Decl(objectRestParameter.ts, 3, 48))
|
||||
>rest : Symbol(rest, Decl(objectRestParameter.ts, 5, 37))
|
||||
>y : Symbol(y, Decl(objectRestParameter.ts, 3, 48))
|
||||
>nested.ka : Symbol(ka, Decl(objectRestParameter.ts, 3, 42))
|
||||
>nested : Symbol(nested, Decl(objectRestParameter.ts, 5, 24))
|
||||
>ka : Symbol(ka, Decl(objectRestParameter.ts, 3, 42))
|
||||
|
||||
|
||||
56
tests/baselines/reference/objectRestParameter.types
Normal file
56
tests/baselines/reference/objectRestParameter.types
Normal file
@ -0,0 +1,56 @@
|
||||
=== tests/cases/conformance/types/rest/objectRestParameter.ts ===
|
||||
function cloneAgain({ a, ...clone }: { a: number, b: string }): void {
|
||||
>cloneAgain : ({a, ...clone}: { a: number; b: string; }) => void
|
||||
>a : number
|
||||
>clone : { b: string; }
|
||||
>a : number
|
||||
>b : string
|
||||
}
|
||||
|
||||
declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void);
|
||||
>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any
|
||||
>f : (a: { x: { z: any; ka: any; }; y: string; }) => void
|
||||
>a : { x: { z: any; ka: any; }; y: string; }
|
||||
>x : { z: any; ka: any; }
|
||||
>z : any
|
||||
>ka : any
|
||||
>y : string
|
||||
|
||||
suddenly(({ x: a, ...rest }) => rest.y);
|
||||
>suddenly(({ x: a, ...rest }) => rest.y) : any
|
||||
>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any
|
||||
>({ x: a, ...rest }) => rest.y : ({x: a, ...rest}: { x: { z: any; ka: any; }; y: string; }) => string
|
||||
>x : any
|
||||
>a : { z: any; ka: any; }
|
||||
>rest : { y: string; }
|
||||
>rest.y : string
|
||||
>rest : { y: string; }
|
||||
>y : string
|
||||
|
||||
suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka);
|
||||
>suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any
|
||||
>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any
|
||||
>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({x: {z, ...nested}, ...rest}?: { x: { z: any; ka: any; }; y: string; }) => string
|
||||
>x : any
|
||||
>z : any
|
||||
>12 : 12
|
||||
>nested : { ka: any; }
|
||||
>rest : { y: string; }
|
||||
>{ x: { z: 1, ka: 1 }, y: 'noo' } : { x: { z: number; ka: number; }; y: string; }
|
||||
>x : { z: number; ka: number; }
|
||||
>{ z: 1, ka: 1 } : { z: number; ka: number; }
|
||||
>z : number
|
||||
>1 : 1
|
||||
>ka : number
|
||||
>1 : 1
|
||||
>y : string
|
||||
>'noo' : "noo"
|
||||
>rest.y + nested.ka : string
|
||||
>rest.y : string
|
||||
>rest : { y: string; }
|
||||
>y : string
|
||||
>nested.ka : any
|
||||
>nested : { ka: any; }
|
||||
>ka : any
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/es6/destructuring/restElementMustBeLast.ts(1,9): error TS2462: A rest element must be last in an array destructuring pattern
|
||||
tests/cases/conformance/es6/destructuring/restElementMustBeLast.ts(2,2): error TS2462: A rest element must be last in an array destructuring pattern
|
||||
tests/cases/conformance/types/rest/restElementMustBeLast.ts(1,9): error TS2462: A rest element must be last in a destructuring pattern
|
||||
tests/cases/conformance/types/rest/restElementMustBeLast.ts(2,2): error TS2462: A rest element must be last in a destructuring pattern
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/restElementMustBeLast.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/rest/restElementMustBeLast.ts (2 errors) ====
|
||||
var [...a, x] = [1, 2, 3]; // Error, rest must be last element
|
||||
~
|
||||
!!! error TS2462: A rest element must be last in an array destructuring pattern
|
||||
!!! error TS2462: A rest element must be last in a destructuring pattern
|
||||
[...a, x] = [1, 2, 3]; // Error, rest must be last element
|
||||
~~~~
|
||||
!!! error TS2462: A rest element must be last in an array destructuring pattern
|
||||
!!! error TS2462: A rest element must be last in a destructuring pattern
|
||||
|
||||
@ -194,13 +194,13 @@ for (_b = getRobot(), _c = _b.name, nameA = _c === void 0 ? "noName" : _c, _b, i
|
||||
for (_d = { name: "trimmer", skill: "trimming" }, _e = _d.name, nameA = _e === void 0 ? "noName" : _e, _d, i = 0; i < 1; i++) {
|
||||
console.log(nameA);
|
||||
}
|
||||
for (_f = multiRobot.skills, _g = _f === void 0 ? { primary: "none", secondary: "none" } : _f, _h = _g.primary, primaryA = _h === void 0 ? "primary" : _h, _j = _g.secondary, secondaryA = _j === void 0 ? "secondary" : _j, multiRobot, i = 0; i < 1; i++) {
|
||||
for (_f = multiRobot.skills, _g = _f === void 0 ? { primary: "none", secondary: "none" } : _f, _h = _g.primary, primaryA = _h === void 0 ? "primary" : _h, _j = _g.secondary, secondaryA = _j === void 0 ? "secondary" : _j, multiRobot, multiRobot, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_k = getMultiRobot(), _l = _k.skills, _m = _l === void 0 ? { primary: "none", secondary: "none" } : _l, _o = _m.primary, primaryA = _o === void 0 ? "primary" : _o, _p = _m.secondary, secondaryA = _p === void 0 ? "secondary" : _p, _k, i = 0; i < 1; i++) {
|
||||
for (_k = getMultiRobot(), (_l = _k.skills, _m = _l === void 0 ? { primary: "none", secondary: "none" } : _l, _o = _m.primary, primaryA = _o === void 0 ? "primary" : _o, _p = _m.secondary, secondaryA = _p === void 0 ? "secondary" : _p, _k), _k, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_q = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _r = _q.skills, _s = _r === void 0 ? { primary: "none", secondary: "none" } : _r, _t = _s.primary, primaryA = _t === void 0 ? "primary" : _t, _u = _s.secondary, secondaryA = _u === void 0 ? "secondary" : _u, _q,
|
||||
for (_q = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, (_r = _q.skills, _s = _r === void 0 ? { primary: "none", secondary: "none" } : _r, _t = _s.primary, primaryA = _t === void 0 ? "primary" : _t, _u = _s.secondary, secondaryA = _u === void 0 ? "secondary" : _u, _q), _q,
|
||||
i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
@ -213,13 +213,13 @@ for (_w = getRobot(), _x = _w.name, name = _x === void 0 ? "noName" : _x, _w, i
|
||||
for (_y = { name: "trimmer", skill: "trimming" }, _z = _y.name, name = _z === void 0 ? "noName" : _z, _y, i = 0; i < 1; i++) {
|
||||
console.log(nameA);
|
||||
}
|
||||
for (_0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primary = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondary = _3 === void 0 ? "secondary" : _3, multiRobot, i = 0; i < 1; i++) {
|
||||
for (_0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primary = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondary = _3 === void 0 ? "secondary" : _3, multiRobot, multiRobot, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_4 = getMultiRobot(), _5 = _4.skills, _6 = _5 === void 0 ? { primary: "none", secondary: "none" } : _5, _7 = _6.primary, primary = _7 === void 0 ? "primary" : _7, _8 = _6.secondary, secondary = _8 === void 0 ? "secondary" : _8, _4, i = 0; i < 1; i++) {
|
||||
for (_4 = getMultiRobot(), (_5 = _4.skills, _6 = _5 === void 0 ? { primary: "none", secondary: "none" } : _5, _7 = _6.primary, primary = _7 === void 0 ? "primary" : _7, _8 = _6.secondary, secondary = _8 === void 0 ? "secondary" : _8, _4), _4, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_9 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _10 = _9.skills, _11 = _10 === void 0 ? { primary: "none", secondary: "none" } : _10, _12 = _11.primary, primary = _12 === void 0 ? "primary" : _12, _13 = _11.secondary, secondary = _13 === void 0 ? "secondary" : _13, _9,
|
||||
for (_9 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, (_10 = _9.skills, _11 = _10 === void 0 ? { primary: "none", secondary: "none" } : _10, _12 = _11.primary, primary = _12 === void 0 ? "primary" : _12, _13 = _11.secondary, secondary = _13 === void 0 ? "secondary" : _13, _9), _9,
|
||||
i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
@ -232,13 +232,13 @@ for (_16 = getRobot(), _17 = _16.name, nameA = _17 === void 0 ? "noName" : _17,
|
||||
for (_19 = { name: "trimmer", skill: "trimming" }, _20 = _19.name, nameA = _20 === void 0 ? "noName" : _20, _21 = _19.skill, skillA = _21 === void 0 ? "skill" : _21, _19, i = 0; i < 1; i++) {
|
||||
console.log(nameA);
|
||||
}
|
||||
for (_22 = multiRobot.name, nameA = _22 === void 0 ? "noName" : _22, _23 = multiRobot.skills, _24 = _23 === void 0 ? { primary: "none", secondary: "none" } : _23, _25 = _24.primary, primaryA = _25 === void 0 ? "primary" : _25, _26 = _24.secondary, secondaryA = _26 === void 0 ? "secondary" : _26, multiRobot, i = 0; i < 1; i++) {
|
||||
for (_22 = multiRobot.name, nameA = _22 === void 0 ? "noName" : _22, _23 = multiRobot.skills, _24 = _23 === void 0 ? { primary: "none", secondary: "none" } : _23, _25 = _24.primary, primaryA = _25 === void 0 ? "primary" : _25, _26 = _24.secondary, secondaryA = _26 === void 0 ? "secondary" : _26, multiRobot, multiRobot, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_27 = getMultiRobot(), _28 = _27.name, nameA = _28 === void 0 ? "noName" : _28, _29 = _27.skills, _30 = _29 === void 0 ? { primary: "none", secondary: "none" } : _29, _31 = _30.primary, primaryA = _31 === void 0 ? "primary" : _31, _32 = _30.secondary, secondaryA = _32 === void 0 ? "secondary" : _32, _27, i = 0; i < 1; i++) {
|
||||
for (_27 = getMultiRobot(), (_28 = _27.name, nameA = _28 === void 0 ? "noName" : _28, _29 = _27.skills, _30 = _29 === void 0 ? { primary: "none", secondary: "none" } : _29, _31 = _30.primary, primaryA = _31 === void 0 ? "primary" : _31, _32 = _30.secondary, secondaryA = _32 === void 0 ? "secondary" : _32, _27), _27, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_33 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _34 = _33.name, nameA = _34 === void 0 ? "noName" : _34, _35 = _33.skills, _36 = _35 === void 0 ? { primary: "none", secondary: "none" } : _35, _37 = _36.primary, primaryA = _37 === void 0 ? "primary" : _37, _38 = _36.secondary, secondaryA = _38 === void 0 ? "secondary" : _38, _33,
|
||||
for (_33 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, (_34 = _33.name, nameA = _34 === void 0 ? "noName" : _34, _35 = _33.skills, _36 = _35 === void 0 ? { primary: "none", secondary: "none" } : _35, _37 = _36.primary, primaryA = _37 === void 0 ? "primary" : _37, _38 = _36.secondary, secondaryA = _38 === void 0 ? "secondary" : _38, _33), _33,
|
||||
i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
@ -251,15 +251,16 @@ for (_41 = getRobot(), _42 = _41.name, name = _42 === void 0 ? "noName" : _42, _
|
||||
for (_44 = { name: "trimmer", skill: "trimming" }, _45 = _44.name, name = _45 === void 0 ? "noName" : _45, _46 = _44.skill, skill = _46 === void 0 ? "skill" : _46, _44, i = 0; i < 1; i++) {
|
||||
console.log(nameA);
|
||||
}
|
||||
for (_47 = multiRobot.name, name = _47 === void 0 ? "noName" : _47, _48 = multiRobot.skills, _49 = _48 === void 0 ? { primary: "none", secondary: "none" } : _48, _50 = _49.primary, primary = _50 === void 0 ? "primary" : _50, _51 = _49.secondary, secondary = _51 === void 0 ? "secondary" : _51, multiRobot, i = 0; i < 1; i++) {
|
||||
for (_47 = multiRobot.name, name = _47 === void 0 ? "noName" : _47, _48 = multiRobot.skills, _49 = _48 === void 0 ? { primary: "none", secondary: "none" } : _48, _50 = _49.primary, primary = _50 === void 0 ? "primary" : _50, _51 = _49.secondary, secondary = _51 === void 0 ? "secondary" : _51, multiRobot, multiRobot, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_52 = getMultiRobot(), _53 = _52.name, name = _53 === void 0 ? "noName" : _53, _54 = _52.skills, _55 = _54 === void 0 ? { primary: "none", secondary: "none" } : _54, _56 = _55.primary, primary = _56 === void 0 ? "primary" : _56, _57 = _55.secondary, secondary = _57 === void 0 ? "secondary" : _57, _52, i = 0; i < 1; i++) {
|
||||
for (_52 = getMultiRobot(), (_53 = _52.name, name = _53 === void 0 ? "noName" : _53, _54 = _52.skills, _55 = _54 === void 0 ? { primary: "none", secondary: "none" } : _54, _56 = _55.primary, primary = _56 === void 0 ? "primary" : _56, _57 = _55.secondary, secondary = _57 === void 0 ? "secondary" : _57, _52), _52, i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
for (_58 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _59 = _58.name, name = _59 === void 0 ? "noName" : _59, _60 = _58.skills, _61 = _60 === void 0 ? { primary: "none", secondary: "none" } : _60, _62 = _61.primary, primary = _62 === void 0 ? "primary" : _62, _63 = _61.secondary, secondary = _63 === void 0 ? "secondary" : _63, _58,
|
||||
for (_58 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, (_59 = _58.name, name = _59 === void 0 ? "noName" : _59, _60 = _58.skills, _61 = _60 === void 0 ? { primary: "none", secondary: "none" } : _60, _62 = _61.primary, primary = _62 === void 0 ? "primary" : _62, _63 = _61.secondary, secondary = _63 === void 0 ? "secondary" : _63, _58), _58,
|
||||
i = 0; i < 1; i++) {
|
||||
console.log(primaryA);
|
||||
}
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63;
|
||||
var _k, _q, _4, _9, _27, _33, _52, _58;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _l, _m, _o, _p, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _5, _6, _7, _8, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _28, _29, _30, _31, _32, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _53, _54, _55, _56, _57, _59, _60, _61, _62, _63;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user