2016-09-10 00:13:51 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
// Should handle all the various type references
|
|
|
|
|
|
|
|
//// interface Fo/*interface_definition*/o {
|
|
|
|
//// hello (): void;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// interface Bar {
|
|
|
|
//// hello (): void;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// let x1: Foo = [|{ hello () { /**typeReference*/ } }|];
|
|
|
|
//// let x2: () => Foo = [|(() => { hello () { /**functionType*/} })|];
|
|
|
|
//// let x3: Foo | Bar = [|{ hello () { /**unionType*/} }|];
|
2016-09-10 01:24:09 +02:00
|
|
|
//// let x4: Foo & (Foo & Bar) = [|{ hello () { /**intersectionType*/} }|];
|
2016-09-10 00:13:51 +02:00
|
|
|
//// let x5: [Foo] = [|[{ hello () { /**tupleType*/} }]|];
|
|
|
|
//// let x6: (Foo) = [|{ hello () { /**parenthesizedType*/} }|];
|
|
|
|
//// let x7: (new() => Foo) = [|class { hello () { /**constructorType*/} }|];
|
|
|
|
//// let x8: Foo[] = [|[{ hello () { /**arrayType*/} }]|];
|
|
|
|
//// let x9: { y: Foo } = [|{ y: { hello () { /**typeLiteral*/} } }|];
|
2017-03-16 23:53:05 +01:00
|
|
|
//// let x10 = [|{|"parts": ["(","anonymous local class",")"], "kind": "local class"|}class implements Foo { hello() {} }|]
|
2018-05-31 22:32:02 +02:00
|
|
|
//// let x11 = class [|{|"parts": ["(","local class",")"," ","C"], "kind": "local class"|}C|] implements Foo { hello() {} }
|
2016-09-10 00:13:51 +02:00
|
|
|
////
|
|
|
|
//// // Should not do anything for type predicates
|
|
|
|
//// function isFoo(a: any): a is Foo {
|
|
|
|
//// return true;
|
|
|
|
//// }
|
|
|
|
|
2018-05-31 22:32:02 +02:00
|
|
|
verify.allRangesAppearInImplementationList("interface_definition");
|