TypeScript/tests/cases/fourslash/goToDefinitionIndexSignature.ts
Andy 998beadba2
Support goto-definition for index signatures (#23220)
* Support goto-definition for index signatures

* Use checker.getIndexInfoOfType

* Handle undefined info.declaration
2018-04-09 12:48:41 -07:00

16 lines
354 B
TypeScript

/// <reference path='fourslash.ts'/>
////interface I {
//// /*defI*/[x: string]: boolean;
////}
////interface J {
//// /*defJ*/[x: string]: number;
////}
////declare const i: I;
////i.[|/*useI*/foo|];
////declare const ij: I | J;
////ij.[|/*useIJ*/foo|];
verify.goToDefinition("useI", ["defI"]);
verify.goToDefinition("useIJ", ["defI", "defJ"]);