@@ -51,7 +51,9 @@ export function configureProgramForMultiEmit(
51
51
// Attach the originals to the Program instance to avoid modifying the same Program twice.
52
52
// Don't use WeakMap because this Program could theoretically get a { ... } applied to it.
53
53
[ INNER_GET_COMPILER_OPTIONS_SYMBOL ] ?: TTypescript . Program [ 'getCompilerOptions' ] ;
54
- [ INNER_EMIT_SYMBOL ] ?: TTypescript . Program [ 'emit' ] ;
54
+ [ INNER_EMIT_SYMBOL ] ?: // https://github.com/microsoft/TypeScript/blob/88cb76d314a93937ce8d9543114ccbad993be6d1/src/compiler/program.ts#L2697-L2698
55
+ // There is a "forceDtsEmit" parameter that is not on the published types.
56
+ ( ...args : [ ...Parameters < TTypescript . Program [ 'emit' ] > , boolean | undefined ] ) => TTypescript . EmitResult ;
55
57
}
56
58
57
59
const program : IProgramWithMultiEmit = innerProgram ;
@@ -118,15 +120,17 @@ export function configureProgramForMultiEmit(
118
120
writeFile ?: TTypescript . WriteFileCallback ,
119
121
cancellationToken ?: TTypescript . CancellationToken ,
120
122
emitOnlyDtsFiles ?: boolean ,
121
- customTransformers ?: TTypescript . CustomTransformers
123
+ customTransformers ?: TTypescript . CustomTransformers ,
124
+ forceDtsEmit ?: boolean
122
125
) => {
123
126
if ( emitOnlyDtsFiles ) {
124
127
return program [ INNER_EMIT_SYMBOL ] ! (
125
128
targetSourceFile ,
126
129
writeFile ,
127
130
cancellationToken ,
128
131
emitOnlyDtsFiles ,
129
- customTransformers
132
+ customTransformers ,
133
+ forceDtsEmit
130
134
) ;
131
135
}
132
136
@@ -151,7 +155,8 @@ export function configureProgramForMultiEmit(
151
155
writeFile && wrapWriteFile ( writeFile , moduleKindToEmit . jsExtensionOverride ) ,
152
156
cancellationToken ,
153
157
emitOnlyDtsFiles ,
154
- customTransformers
158
+ customTransformers ,
159
+ forceDtsEmit
155
160
) ;
156
161
157
162
emitSkipped = emitSkipped || flavorResult . emitSkipped ;
0 commit comments