mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
Added test for goToDef on union types.
This commit is contained in:
parent
42babc52d3
commit
b3ccb562fb
32
tests/cases/fourslash/goToDefinitionUnionTypeProperty4.ts
Normal file
32
tests/cases/fourslash/goToDefinitionUnionTypeProperty4.ts
Normal file
@ -0,0 +1,32 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface SnapCrackle {
|
||||
//// /*def1*/pop(): string;
|
||||
////}
|
||||
////
|
||||
////interface Magnitude {
|
||||
//// /*def2*/pop(): number;
|
||||
////}
|
||||
////
|
||||
////interface Art {
|
||||
//// /*def3*/pop(): boolean;
|
||||
////}
|
||||
////
|
||||
////var art: Art;
|
||||
////var magnitude: Magnitude;
|
||||
////var snapcrackle: SnapCrackle;
|
||||
////
|
||||
////var x = (snapcrackle || magnitude || art)./*usage*/pop;
|
||||
|
||||
goTo.marker("usage");
|
||||
verify.definitionCountIs(3);
|
||||
goTo.definition(0);
|
||||
verify.caretAtMarker("def1");
|
||||
|
||||
goTo.marker("usage");
|
||||
goTo.definition(1);
|
||||
verify.caretAtMarker("def2");
|
||||
|
||||
goTo.marker("usage");
|
||||
goTo.definition(2);
|
||||
verify.caretAtMarker("def3");
|
||||
Loading…
x
Reference in New Issue
Block a user