mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
extract type test
This commit is contained in:
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");
|
||||
}
|
||||
Reference in New Issue
Block a user