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
|
=== tests/cases/compiler/targetTypeObjectLiteralToAny.ts ===
function suggest(){
>suggest : Symbol(suggest, Decl(targetTypeObjectLiteralToAny.ts, 0, 0))
var TypeScriptKeywords:string[];
>TypeScriptKeywords : Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4))
var result:any;
>result : Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4))
TypeScriptKeywords.forEach(function(keyword) {
>TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
>TypeScriptKeywords : Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4))
>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
>keyword : Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37))
result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any
>result : Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4))
>text : Symbol(text, Decl(targetTypeObjectLiteralToAny.ts, 5, 15))
>keyword : Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37))
>type : Symbol(type, Decl(targetTypeObjectLiteralToAny.ts, 5, 28))
});
}
|