From 53549fd82f95dda5ec60a4ea8f08bbf5e5def03a Mon Sep 17 00:00:00 2001 From: Gavin1012 Date: Fri, 24 Jun 2022 10:09:31 +0800 Subject: [PATCH] fixed 1c9471a from https://gitee.com/gavin1012_hw/ark_ts2abc/pulls/310 mv dtsFiles back to argv before args parsing Signed-off-by: Gavin1012 Change-Id: I5d0de9f9e34ac2518945a8c843aa3e07d2b82b4d --- ts2panda/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts2panda/src/index.ts b/ts2panda/src/index.ts index 7b77bb16b4..866827b25d 100644 --- a/ts2panda/src/index.ts +++ b/ts2panda/src/index.ts @@ -290,7 +290,7 @@ function run(args: string[], options?: ts.CompilerOptions): void { return; } - main(parsed.fileNames.concat(dtsFiles).concat(CmdOptions.getIncludedFiles()), parsed.options); + main(parsed.fileNames.concat(CmdOptions.getIncludedFiles()), parsed.options); } catch (err) { if (err instanceof diag.DiagnosticError) { let diagnostic = diag.getDiagnostic(err.code); @@ -307,5 +307,7 @@ function run(args: string[], options?: ts.CompilerOptions): void { } let dtsFiles = getDtsFiles(path["join"](__dirname, "../node_modules/typescript/lib")); +// keep these dtsFiles been pushed here +process.argv.push(...dtsFiles); run(process.argv.slice(2), Compiler.Options.Default); global.gc(); -- Gitee