Skip to content

Commit

Permalink
Merge pull request #18501 from Microsoft/formatOptions
Browse files Browse the repository at this point in the history
Make formatOptions optional in GetEditsForRefactorRequestArgs
  • Loading branch information
amcasey committed Sep 16, 2017
2 parents 83f2401 + 0b76e43 commit 0ac8406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ namespace ts.server.protocol {
refactor: string;
/* The 'name' property from the refactoring action */
action: string;
formatOptions: FormatCodeSettings,
formatOptions?: FormatCodeSettings,
};


Expand Down
2 changes: 1 addition & 1 deletion src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ namespace ts.server {

const result = project.getLanguageService().getEditsForRefactor(
file,
convertFormatOptions(args.formatOptions),
args.formatOptions ? convertFormatOptions(args.formatOptions) : this.projectService.getFormatCodeOptions(),
position || textRange,
args.refactor,
args.action
Expand Down

0 comments on commit 0ac8406

Please sign in to comment.