* Always generate type & symbol baselines * Accept changed shadowed baselines * Accept brand new type and symbol baselines * Allow `getTypeAtLocation` to return undefined in the type writer * Accept baselines which had missing type information * Bind container for dynamically names enum members so they may be printed * Accept type/symbol baselines for enums with computed members * First pass at reducing typeWriter memory overhead * Use generators to allow for type and symbol baselines with no cache * Accept new baselines for tests whose output was fixed by better newline splitting * Hard cap on number of declarations printed, cache declaration print text * handle differing newlines better still to handle RWC newlines * Lower abridging count, accept abridged baselines * Limit max RWC error output size, limit RWC type and symbol baseline input size * Move skip logic into type and symbol baseliner to streamline error handling * Accept removal of empty baselines * Canonicalize path earlier to handle odd paths in input files * Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another * No need to pathify again
99 lines
2.3 KiB
Text
99 lines
2.3 KiB
Text
=== tests/cases/compiler/extendArray.ts ===
|
|
var a = [1,2];
|
|
>a : number[]
|
|
>[1,2] : number[]
|
|
>1 : 1
|
|
>2 : 2
|
|
|
|
a.forEach(function (v,i,a) {});
|
|
>a.forEach(function (v,i,a) {}) : void
|
|
>a.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void
|
|
>a : number[]
|
|
>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void
|
|
>function (v,i,a) {} : (v: number, i: number, a: number[]) => void
|
|
>v : number
|
|
>i : number
|
|
>a : number[]
|
|
|
|
|
|
declare module _Core {
|
|
>_Core : any
|
|
|
|
interface Array {
|
|
>Array : Array
|
|
|
|
collect(fn:(e:_element) => _element[]) : any[];
|
|
>collect : (fn: (e: any) => any[]) => any[]
|
|
>fn : (e: any) => any[]
|
|
>e : any
|
|
>_element : No type information available!
|
|
>_element : No type information available!
|
|
}
|
|
}
|
|
|
|
|
|
var arr = (<any>Array).prototype;
|
|
>arr : any
|
|
>(<any>Array).prototype : any
|
|
>(<any>Array) : any
|
|
><any>Array : any
|
|
>Array : ArrayConstructor
|
|
>prototype : any
|
|
|
|
arr.collect = function (fn) {
|
|
>arr.collect = function (fn) { var res = []; for (var i = 0; i < this.length; ++i) { var tmp = fn(this[i]); for (var j = 0; j < tmp.length; ++j) { res.push(tmp[j]); } } return res;} : (fn: any) => any[]
|
|
>arr.collect : any
|
|
>arr : any
|
|
>collect : any
|
|
>function (fn) { var res = []; for (var i = 0; i < this.length; ++i) { var tmp = fn(this[i]); for (var j = 0; j < tmp.length; ++j) { res.push(tmp[j]); } } return res;} : (fn: any) => any[]
|
|
>fn : any
|
|
|
|
var res = [];
|
|
>res : any[]
|
|
>[] : undefined[]
|
|
|
|
for (var i = 0; i < this.length; ++i) {
|
|
>i : number
|
|
>0 : 0
|
|
>i < this.length : boolean
|
|
>i : number
|
|
>this.length : any
|
|
>this : any
|
|
>length : any
|
|
>++i : number
|
|
>i : number
|
|
|
|
var tmp = fn(this[i]);
|
|
>tmp : any
|
|
>fn(this[i]) : any
|
|
>fn : any
|
|
>this[i] : any
|
|
>this : any
|
|
>i : number
|
|
|
|
for (var j = 0; j < tmp.length; ++j) {
|
|
>j : number
|
|
>0 : 0
|
|
>j < tmp.length : boolean
|
|
>j : number
|
|
>tmp.length : any
|
|
>tmp : any
|
|
>length : any
|
|
>++j : number
|
|
>j : number
|
|
|
|
res.push(tmp[j]);
|
|
>res.push(tmp[j]) : number
|
|
>res.push : (...items: any[]) => number
|
|
>res : any[]
|
|
>push : (...items: any[]) => number
|
|
>tmp[j] : any
|
|
>tmp : any
|
|
>j : number
|
|
}
|
|
}
|
|
return res;
|
|
>res : any[]
|
|
|
|
};
|
|
|