2016-08-22 22:57:40 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
// Should go to definitions in object literals in return statements of functions with the type of the interface
|
|
|
|
|
|
|
|
//// interface Fo/*interface_definition*/o { hello: () => void }
|
|
|
|
////
|
2016-09-07 02:14:21 +02:00
|
|
|
//// let x: number = 9;
|
|
|
|
////
|
2016-08-22 22:57:40 +02:00
|
|
|
//// function createFoo(): Foo {
|
2016-09-07 02:14:21 +02:00
|
|
|
//// if (x === 2) {
|
|
|
|
//// return [|{
|
|
|
|
//// hello() {}
|
|
|
|
//// }|];
|
|
|
|
//// }
|
2016-08-22 22:57:40 +02:00
|
|
|
//// return [|{
|
|
|
|
//// hello() {}
|
|
|
|
//// }|];
|
|
|
|
//// }
|
|
|
|
////
|
2016-09-14 02:33:49 +02:00
|
|
|
//// let createFoo2 = (): Foo => [|({hello() {}})|];
|
|
|
|
////
|
2016-08-22 22:57:40 +02:00
|
|
|
//// function createFooLike() {
|
|
|
|
//// return {
|
|
|
|
//// hello() {}
|
|
|
|
//// };
|
|
|
|
//// }
|
|
|
|
|
2016-09-14 02:33:49 +02:00
|
|
|
verify.allRangesAppearInImplementationList("interface_definition");
|