Skip to content

Commit

Permalink
fix: make sure outter options.modules not change
Browse files Browse the repository at this point in the history
  • Loading branch information
meixg committed Nov 20, 2019
1 parent 6fb82c6 commit e8f5461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export function compile(filePath: string, options: Ts2phpOptions = {}) {
...defaultOptions,
...options
};
// avoid change options
finalOptions.modules = Object.assign({}, options.modules);

const typeChecker = program.getTypeChecker();

Expand Down

0 comments on commit e8f5461

Please sign in to comment.