Skip to content

Commit 0ac8406

Browse files
authored
Merge pull request #18501 from Microsoft/formatOptions
Make formatOptions optional in GetEditsForRefactorRequestArgs
2 parents 83f2401 + 0b76e43 commit 0ac8406

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server/protocol.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ namespace ts.server.protocol {
494494
refactor: string;
495495
/* The 'name' property from the refactoring action */
496496
action: string;
497-
formatOptions: FormatCodeSettings,
497+
formatOptions?: FormatCodeSettings,
498498
};
499499

500500

src/server/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ namespace ts.server {
14881488

14891489
const result = project.getLanguageService().getEditsForRefactor(
14901490
file,
1491-
convertFormatOptions(args.formatOptions),
1491+
args.formatOptions ? convertFormatOptions(args.formatOptions) : this.projectService.getFormatCodeOptions(),
14921492
position || textRange,
14931493
args.refactor,
14941494
args.action

0 commit comments

Comments
 (0)