Merge pull request #18501 from Microsoft/formatOptions

Make formatOptions optional in GetEditsForRefactorRequestArgs
This commit is contained in:
Andrew Casey 2017-09-15 17:11:08 -07:00 committed by GitHub
commit 0ac8406cd7
2 changed files with 2 additions and 2 deletions

View File

@ -494,7 +494,7 @@ namespace ts.server.protocol {
refactor: string;
/* The 'name' property from the refactoring action */
action: string;
formatOptions: FormatCodeSettings,
formatOptions?: FormatCodeSettings,
};

View File

@ -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