(options: RollupTypescriptOptions)
| 14 | * - `tslib`: ESM code from the tslib helper library (possibly custom). |
| 15 | */ |
| 16 | export const getPluginOptions = (options: RollupTypescriptOptions) => { |
| 17 | const { |
| 18 | cacheDir, |
| 19 | exclude, |
| 20 | include, |
| 21 | filterRoot, |
| 22 | noForceEmit, |
| 23 | transformers, |
| 24 | recreateTransformersOnRebuild, |
| 25 | tsconfig, |
| 26 | tslib, |
| 27 | typescript, |
| 28 | outputToFilesystem, |
| 29 | compilerOptions, |
| 30 | // previously was compilerOptions |
| 31 | ...extra |
| 32 | } = options; |
| 33 | |
| 34 | return { |
| 35 | cacheDir, |
| 36 | include, |
| 37 | exclude, |
| 38 | filterRoot, |
| 39 | noForceEmit: noForceEmit || false, |
| 40 | tsconfig, |
| 41 | compilerOptions: { ...extra, ...compilerOptions } as PartialCompilerOptions, |
| 42 | typescript: typescript || defaultTs, |
| 43 | tslib: tslib || getTsLibPath(), |
| 44 | transformers, |
| 45 | // Only enable when explicitly set to true to avoid truthy string pitfalls in JS configs |
| 46 | recreateTransformersOnRebuild: recreateTransformersOnRebuild === true, |
| 47 | outputToFilesystem |
| 48 | }; |
| 49 | }; |
no test coverage detected