23 lines
928 B
Plaintext
23 lines
928 B
Plaintext
tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts(3,7): error TS2339: Property 'blah' does not exist on type 'T'.
|
|
tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts(9,7): error TS2339: Property 'blah' does not exist on type 'T'.
|
|
tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts(10,7): error TS2339: Property 'toString' does not exist on type 'T'.
|
|
|
|
|
|
==== 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'.
|
|
} |