mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
1.4 KiB
Plaintext
28 lines
1.4 KiB
Plaintext
anyAsGenericFunctionCall.ts(5,9): error TS2347: Untyped function calls may not accept type arguments.
|
|
anyAsGenericFunctionCall.ts(6,9): error TS2347: Untyped function calls may not accept type arguments.
|
|
anyAsGenericFunctionCall.ts(8,11): error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
anyAsGenericFunctionCall.ts(9,9): error TS2347: Untyped function calls may not accept type arguments.
|
|
anyAsGenericFunctionCall.ts(10,9): error TS2347: Untyped function calls may not accept type arguments.
|
|
|
|
|
|
==== anyAsGenericFunctionCall.ts (5 errors) ====
|
|
// any is considered an untyped function call
|
|
// can be called except with type arguments which is an error
|
|
|
|
var x: any;
|
|
var a = x<number>();
|
|
~~~~~~~~~~~
|
|
!!! error TS2347: Untyped function calls may not accept type arguments.
|
|
var b = x<string>('hello');
|
|
~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2347: Untyped function calls may not accept type arguments.
|
|
|
|
class C { foo: string; }
|
|
~~~
|
|
!!! error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
var c = x<C>(x);
|
|
~~~~~~~
|
|
!!! error TS2347: Untyped function calls may not accept type arguments.
|
|
var d = x<any>(x);
|
|
~~~~~~~~~
|
|
!!! error TS2347: Untyped function calls may not accept type arguments. |