TypeScript/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt
2014-09-11 16:11:08 -07:00

18 lines
550 B
Plaintext

==== tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts (3 errors) ====
function fee<T>() {
var t: T;
t.blah; // Error
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'T'.
t.toString; // ok
}
function fee2<T extends any>() {
var t: T;
t.blah; // Error
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'T'.
t.toString; // ok
~~~~~~~~
!!! error TS2339: Property 'toString' does not exist on type 'T'.
}