From ce1ad923725a20cb0769cd42ba3d95eadc3e0ba6 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 4 Jun 2022 22:01:07 -0400 Subject: [PATCH] clean: remove redundant `allImportedFiles` check in `_onwrite` - this checks if any of the files in `parsedConfig.fileNames` are _not_ in `allImportedFiles`, but all the files in `parsedConfig.fileNames` are explicitly added in the `options` hook on line 98 - so this is redundant / dead code; the check will never be true - this can be considered a remnant of an old bug as an old commit fixed a bug with `allImportedFiles` after it was released: https://github.com/ezolenko/rollup-plugin-typescript2/commit/f24359e668324124a2de40f955a0ff206bf2cf86 --- src/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index f0960108..0be02212 100644 --- a/src/index.ts +++ b/src/index.ts @@ -303,11 +303,6 @@ const typescript: PluginImpl = (options) => const key = normalize(name); if (key in declarations) return; - if (!allImportedFiles.has(key)) - { - context.debug(() => `skipping declarations for unused '${key}'`); - return; - } context.debug(() => `generating missed declarations for '${key}'`); const output = service.getEmitOutput(key, true);