extract type test

This commit is contained in:
Jesse Trinity 2020-05-26 13:12:02 -07:00
parent 85e0d8b14a
commit df8ff659c5

View file

@ -0,0 +1,12 @@
/// <reference path='fourslash.ts' />
//// var x: /*1a*/{ a?:/*2a*/ number, b?: string/*2b*//*3a*//*3b*/ }/*1b*/ = { };
// Only offer refactor for cursor position if explicitly requested
goTo.select("3a", "3b");
verify.refactorNotAvailableForTriggerReason("implicit", "Extract type");
for (const m of ["1", "2", "3"]) {
goTo.select(m + "a", m + "b");
verify.refactorAvailableForTriggerReason("invoked", "Extract type");
}