Skip to content

Commit 09d1f06

Browse files
committed
refactor(tsfmt): use spread operator
1 parent 6030f75 commit 09d1f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Processor {
4040
}
4141

4242
processFormatCodeOptions(fileName: string, opts: Options, formatOptions: ts.FormatCodeOptions): Promise<ts.FormatCodeOptions> {
43-
let optionModifiers = ([] as OptionModifier[]).concat(this.optionModifiers);
43+
let optionModifiers = [...this.optionModifiers];
4444

4545
let next = (formatOptions: ts.FormatCodeOptions): Promise<ts.FormatCodeOptions> => {
4646
if (optionModifiers.length === 0) {
@@ -59,7 +59,7 @@ class Processor {
5959
}
6060

6161
postProcess(fileName: string, formattedCode: string, opts: Options, formatOptions: ts.FormatCodeOptions): Promise<string> {
62-
let postProcessors = ([] as PostProcessor[]).concat(this.postProcessors);
62+
let postProcessors = [...this.postProcessors];
6363

6464
let next = (formattedCode: string): Promise<string> => {
6565
if (postProcessors.length === 0) {

0 commit comments

Comments
 (0)