TypeScript/tests/baselines/reference/targetTypeObjectLiteralToAny.types

34 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/targetTypeObjectLiteralToAny.ts ===
function suggest(){
>suggest : () => void
2014-08-15 23:33:16 +02:00
var TypeScriptKeywords:string[];
>TypeScriptKeywords : string[]
2014-08-15 23:33:16 +02:00
var result:any;
>result : any
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
>TypeScriptKeywords.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
>TypeScriptKeywords : string[]
>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
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
>keyword : string
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
>result : any
2014-08-15 23:33:16 +02:00
>push : any
>{text:keyword, type:"keyword"} : { text: string; type: string; }
>text : string
>keyword : string
>type : string
2015-04-13 21:36:11 +02:00
>"keyword" : string
2014-08-15 23:33:16 +02:00
});
}