TypeScript/tests/baselines/reference/anyAsFunctionCall.types
2015-04-13 14:29:37 -07:00

25 lines
750 B
Plaintext

=== tests/cases/conformance/types/any/anyAsFunctionCall.ts ===
// any is considered an untyped function call
// can be called except with type arguments which is an error
var x: any;
>x : any, Symbol(x, Decl(anyAsFunctionCall.ts, 3, 3))
var a = x();
>a : any, Symbol(a, Decl(anyAsFunctionCall.ts, 4, 3))
>x() : any
>x : any, Symbol(x, Decl(anyAsFunctionCall.ts, 3, 3))
var b = x('hello');
>b : any, Symbol(b, Decl(anyAsFunctionCall.ts, 5, 3))
>x('hello') : any
>x : any, Symbol(x, Decl(anyAsFunctionCall.ts, 3, 3))
>'hello' : string
var c = x(x);
>c : any, Symbol(c, Decl(anyAsFunctionCall.ts, 6, 3))
>x(x) : any
>x : any, Symbol(x, Decl(anyAsFunctionCall.ts, 3, 3))
>x : any, Symbol(x, Decl(anyAsFunctionCall.ts, 3, 3))