From 74f3895a74fe807e5ef63b7d8226ae249863d61d Mon Sep 17 00:00:00 2001 From: Gavin1012 Date: Fri, 24 Jun 2022 10:09:31 +0800 Subject: [PATCH] fixed 54b2fa6 from https://gitee.com/gavin1012_hw/ark_ts2abc/pulls/310 Fix abnormal watch mode in IDE 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