Use Object Spread Syntax (#7777)

* Use Object Spread Syntax

* Nits
This commit is contained in:
Justin Ridgewell
2018-04-23 21:44:27 -04:00
committed by GitHub
parent 037fee8ffb
commit 2afe9404fe
37 changed files with 263 additions and 70 deletions

View File

@@ -19,7 +19,9 @@ plugins.typescript = typescriptPlugin;
export function parse(input: string, options?: Options): File {
if (options && options.sourceType === "unambiguous") {
options = Object.assign({}, options);
options = {
...options,
};
try {
options.sourceType = "module";
const parser = getParser(options, input);