Skip to content

Commit

Permalink
fix: pass transformers object to ts.transpileModule method (Fixes #1051
Browse files Browse the repository at this point in the history
…) (#1054)

* fix: pass transformers object to ts.transpileModule method

* refactor: move typeof factory check to its original position
  • Loading branch information
thetutlage committed May 25, 2020
1 parent e567002 commit 1f5b1e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Expand Up @@ -491,7 +491,8 @@ export function create (rawOptions: CreateOptions = {}): Register {
const result = ts.transpileModule(code, {
fileName,
compilerOptions: overrideCompilerOptions ? { ...config.options, ...overrideCompilerOptions } : config.options,
reportDiagnostics: true
reportDiagnostics: true,
transformers: transformers as Exclude<typeof transformers, Function>
})

const diagnosticList = filterDiagnostics(result.diagnostics || [], ignoreDiagnostics)
Expand Down

0 comments on commit 1f5b1e0

Please sign in to comment.