2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/sigantureIsSubTypeIfTheyAreIdentical.ts ===
|
|
|
|
interface ICache {
|
2015-04-16 01:44:20 +02:00
|
|
|
>ICache : ICache
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
get<T>(key: string): T;
|
2015-04-16 01:44:20 +02:00
|
|
|
>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
|
2015-04-16 01:44:20 +02:00
|
|
|
>CacheService : CacheService
|
|
|
|
>ICache : ICache
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
get<T>(key: string): T {
|
2015-04-16 01:44:20 +02:00
|
|
|
>get : <T>(key: string) => T
|
|
|
|
>T : T
|
|
|
|
>key : string
|
|
|
|
>T : T
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return undefined;
|
2015-04-16 01:44:20 +02:00
|
|
|
>undefined : undefined
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|