Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

Commit

Permalink
fix: always filter out definition files
Browse files Browse the repository at this point in the history
26
  • Loading branch information
victordidenko authored and mattyclarkson committed Aug 28, 2018
1 parent 75d57af commit dd0f4f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export default class Mapper {
}

async *files(): AsyncIterableIterator<File> {
const { options } = this.parsed;
yield* this.parsed.fileNames
.filter(path => options.declaration || !path.endsWith('.d.ts'))
.map(path => new EsFile({ path, options, config: this.parsed }));
const config = this.parsed;
const { options, fileNames } = config;
const files = fileNames.filter(n => !n.endsWith('.d.ts'));
yield* files.map(path => new EsFile({ path, options, config }));
if (options.declaration) {
yield* this.parsed.fileNames.map(path => new TsFile({ path, options, config: this.parsed }));
yield* files.map(path => new TsFile({ path, options, config }));
}
}

Expand Down

0 comments on commit dd0f4f1

Please sign in to comment.