TypeScript/tests/baselines/reference/genericWithCallSignatures1.types

41 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/genericWithCallSignatures_1.ts ===
///<reference path="genericWithCallSignatures_0.ts"/>
class MyClass {
2015-04-13 23:01:57 +02:00
>MyClass : MyClass, Symbol(MyClass, Decl(genericWithCallSignatures_1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public callableThing: CallableExtention<string>;
2015-04-13 23:01:57 +02:00
>callableThing : CallableExtention<string>, Symbol(callableThing, Decl(genericWithCallSignatures_1.ts, 1, 15))
>CallableExtention : CallableExtention<T>, Symbol(CallableExtention, Decl(genericWithCallSignatures_0.ts, 3, 1))
2014-08-15 23:33:16 +02:00
public myMethod() {
2015-04-13 23:01:57 +02:00
>myMethod : () => void, Symbol(myMethod, Decl(genericWithCallSignatures_1.ts, 2, 52))
2014-08-15 23:33:16 +02:00
var x = <string> this.callableThing();
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(genericWithCallSignatures_1.ts, 5, 11))
2014-08-15 23:33:16 +02:00
><string> this.callableThing() : string
>this.callableThing() : string
2015-04-13 23:01:57 +02:00
>this.callableThing : CallableExtention<string>, Symbol(callableThing, Decl(genericWithCallSignatures_1.ts, 1, 15))
>this : MyClass, Symbol(MyClass, Decl(genericWithCallSignatures_1.ts, 0, 0))
>callableThing : CallableExtention<string>, Symbol(callableThing, Decl(genericWithCallSignatures_1.ts, 1, 15))
2014-08-15 23:33:16 +02:00
}
}
=== tests/cases/compiler/genericWithCallSignatures_0.ts ===
interface Callable<T> {
2015-04-13 23:01:57 +02:00
>Callable : Callable<T>, Symbol(Callable, Decl(genericWithCallSignatures_0.ts, 0, 0))
>T : T, Symbol(T, Decl(genericWithCallSignatures_0.ts, 0, 19))
2014-08-15 23:33:16 +02:00
(): T;
2015-04-13 23:01:57 +02:00
>T : T, Symbol(T, Decl(genericWithCallSignatures_0.ts, 0, 19))
2014-08-15 23:33:16 +02:00
(value: T): void;
2015-04-13 23:01:57 +02:00
>value : T, Symbol(value, Decl(genericWithCallSignatures_0.ts, 2, 5))
>T : T, Symbol(T, Decl(genericWithCallSignatures_0.ts, 0, 19))
2014-08-15 23:33:16 +02:00
}
interface CallableExtention<T> extends Callable<T> { }
2015-04-13 23:01:57 +02:00
>CallableExtention : CallableExtention<T>, Symbol(CallableExtention, Decl(genericWithCallSignatures_0.ts, 3, 1))
>T : T, Symbol(T, Decl(genericWithCallSignatures_0.ts, 5, 28))
>Callable : Callable<T>, Symbol(Callable, Decl(genericWithCallSignatures_0.ts, 0, 0))
>T : T, Symbol(T, Decl(genericWithCallSignatures_0.ts, 5, 28))
2014-08-15 23:33:16 +02:00