TypeScript/tests/cases/fourslash/refactorExtractType61.ts

19 lines
481 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
//// function foo(a: /*a*/{ a: number | string, b: string } & { c: string } & { d: boolean }/*b*/) { }
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Extract type",
actionName: "Extract to interface",
actionDescription: "Extract to interface",
newContent: `interface /*RENAME*/NewType {
a: number | string;
b: string;
c: string;
d: boolean;
}
function foo(a: NewType) { }`,
});