Skip to content

Commit

Permalink
clean: remove redundant allImportedFiles check in _onwrite (#346)
Browse files Browse the repository at this point in the history
- 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:
  f24359e
  • Loading branch information
agilgur5 authored Jun 7, 2022
1 parent 671281f commit c0fb53d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,6 @@ const typescript: PluginImpl<RPT2Options> = (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);
Expand Down

0 comments on commit c0fb53d

Please sign in to comment.