TypeScript/tests/baselines/reference/targetTypeObjectLiteralToAny.types

34 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/targetTypeObjectLiteralToAny.ts ===
function suggest(){
2015-04-13 23:01:57 +02:00
>suggest : () => void, Symbol(suggest, Decl(targetTypeObjectLiteralToAny.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var TypeScriptKeywords:string[];
2015-04-13 23:01:57 +02:00
>TypeScriptKeywords : string[], Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4))
2014-08-15 23:33:16 +02:00
var result:any;
2015-04-13 23:01:57 +02:00
>result : any, Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4))
2014-08-15 23:33:16 +02:00
TypeScriptKeywords.forEach(function(keyword) {
2014-08-22 03:39:46 +02:00
>TypeScriptKeywords.forEach(function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any }) : void
2015-04-13 23:01:57 +02:00
>TypeScriptKeywords.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void, Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95))
>TypeScriptKeywords : string[], Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4))
>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void, Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95))
2014-08-22 03:39:46 +02:00
>function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (keyword: string) => void
2015-04-13 23:01:57 +02:00
>keyword : string, Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37))
2014-08-15 23:33:16 +02:00
result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any
>result.push({text:keyword, type:"keyword"}) : any
>result.push : any
2015-04-13 23:01:57 +02:00
>result : any, Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4))
2014-08-15 23:33:16 +02:00
>push : any
>{text:keyword, type:"keyword"} : { text: string; type: string; }
2015-04-13 23:01:57 +02:00
>text : string, Symbol(text, Decl(targetTypeObjectLiteralToAny.ts, 5, 15))
>keyword : string, Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37))
>type : string, Symbol(type, Decl(targetTypeObjectLiteralToAny.ts, 5, 28))
2015-04-13 21:36:11 +02:00
>"keyword" : string
2014-08-15 23:33:16 +02:00
});
}