extract type test
This commit is contained in:
parent
85e0d8b14a
commit
df8ff659c5
12
tests/cases/fourslash/refactorExtractTypeValidSpans.ts
Normal file
12
tests/cases/fourslash/refactorExtractTypeValidSpans.ts
Normal 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");
|
||||
}
|
Loading…
Reference in a new issue