TypeScript/tests/baselines/reference/sigantureIsSubTypeIfTheyAreIdentical.types

25 lines
510 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/sigantureIsSubTypeIfTheyAreIdentical.ts ===
interface ICache {
>ICache : ICache
2014-08-15 23:33:16 +02:00
get<T>(key: string): T;
>get : <T>(key: string) => T
>T : T
>key : string
>T : T
2014-08-15 23:33:16 +02:00
}
class CacheService implements ICache { // Should not error that property type of get are incomaptible
>CacheService : CacheService
>ICache : ICache
2014-08-15 23:33:16 +02:00
get<T>(key: string): T {
>get : <T>(key: string) => T
>T : T
>key : string
>T : T
2014-08-15 23:33:16 +02:00
return undefined;
>undefined : undefined
2014-08-15 23:33:16 +02:00
}
}