5353475fce
* 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
97 lines
1.7 KiB
Plaintext
97 lines
1.7 KiB
Plaintext
=== tests/cases/compiler/arraySigChecking.ts ===
|
|
declare module M {
|
|
>M : typeof M
|
|
|
|
interface iBar { t: any; }
|
|
>iBar : iBar
|
|
>t : any
|
|
|
|
interface iFoo extends iBar {
|
|
>iFoo : iFoo
|
|
>iBar : iBar
|
|
|
|
s: any;
|
|
>s : any
|
|
}
|
|
|
|
class cFoo {
|
|
>cFoo : cFoo
|
|
|
|
t: any;
|
|
>t : any
|
|
}
|
|
|
|
var foo: { [index: any]; }; // expect an error here
|
|
>foo : {}
|
|
>index : any
|
|
}
|
|
|
|
interface myInt {
|
|
>myInt : myInt
|
|
|
|
voidFn(): void;
|
|
>voidFn : () => void
|
|
}
|
|
var myVar: myInt;
|
|
>myVar : myInt
|
|
>myInt : myInt
|
|
|
|
var strArray: string[] = [myVar.voidFn()];
|
|
>strArray : string[]
|
|
>[myVar.voidFn()] : void[]
|
|
>myVar.voidFn() : void
|
|
>myVar.voidFn : () => void
|
|
>myVar : myInt
|
|
>voidFn : () => void
|
|
|
|
|
|
var myArray: number[][][];
|
|
>myArray : number[][][]
|
|
|
|
myArray = [[1, 2]];
|
|
>myArray = [[1, 2]] : number[][]
|
|
>myArray : number[][][]
|
|
>[[1, 2]] : number[][]
|
|
>[1, 2] : number[]
|
|
>1 : 1
|
|
>2 : 2
|
|
|
|
function isEmpty(l: { length: number }) {
|
|
>isEmpty : (l: { length: number; }) => boolean
|
|
>l : { length: number; }
|
|
>length : number
|
|
|
|
return l.length === 0;
|
|
>l.length === 0 : boolean
|
|
>l.length : number
|
|
>l : { length: number; }
|
|
>length : number
|
|
>0 : 0
|
|
}
|
|
|
|
isEmpty([]);
|
|
>isEmpty([]) : boolean
|
|
>isEmpty : (l: { length: number; }) => boolean
|
|
>[] : undefined[]
|
|
|
|
isEmpty(new Array(3));
|
|
>isEmpty(new Array(3)) : boolean
|
|
>isEmpty : (l: { length: number; }) => boolean
|
|
>new Array(3) : any[]
|
|
>Array : ArrayConstructor
|
|
>3 : 3
|
|
|
|
isEmpty(new Array<string>(3));
|
|
>isEmpty(new Array<string>(3)) : boolean
|
|
>isEmpty : (l: { length: number; }) => boolean
|
|
>new Array<string>(3) : string[]
|
|
>Array : ArrayConstructor
|
|
>3 : 3
|
|
|
|
isEmpty(['a']);
|
|
>isEmpty(['a']) : boolean
|
|
>isEmpty : (l: { length: number; }) => boolean
|
|
>['a'] : string[]
|
|
>'a' : "a"
|
|
|