TypeScript/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt

18 lines
508 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts (3 errors) ====
function fee<T>() {
var t: T;
t.blah; // Error
~~~~
!!! Property 'blah' does not exist on type 'T'.
t.toString; // ok
}
function fee2<T extends any>() {
var t: T;
t.blah; // Error
~~~~
!!! Property 'blah' does not exist on type 'T'.
t.toString; // ok
~~~~~~~~
!!! Property 'toString' does not exist on type 'T'.
}