mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Allow declarationMap to be emitted when transpiling declarations and option is enabled (#59337)
This commit is contained in:
1 parent
45062406e4
commit
afa03f0948
16 files changed
+980
-4
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
computeSignatureWithDiagnostics,
|
||||
CustomTransformers,
|
||||
Debug,
|
||||
EmitOnly,
|
||||
EmitOutput,
|
||||
emptyArray,
|
||||
GetCanonicalFileName,
|
||||
@@ -418,7 +419,7 @@ export namespace BuilderState {
|
||||
);
|
||||
},
|
||||
cancellationToken,
|
||||
/*emitOnly*/ true,
|
||||
EmitOnly.BuilderSignature,
|
||||
/*customTransformers*/ undefined,
|
||||
/*forceDtsEmit*/ true,
|
||||
);
|
||||
|
||||
@@ -467,7 +467,6 @@ export const commonOptionsWithBuild: CommandLineOption[] = [
|
||||
affectsBuildInfo: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Emit,
|
||||
transpileOptionValue: undefined,
|
||||
defaultValueDescription: false,
|
||||
description: Diagnostics.Create_sourcemaps_for_d_ts_files,
|
||||
},
|
||||
|
||||
@@ -907,7 +907,7 @@ export function emitFiles(
|
||||
module: compilerOptions.module,
|
||||
moduleResolution: compilerOptions.moduleResolution,
|
||||
target: compilerOptions.target,
|
||||
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
||||
sourceMap: emitOnly !== EmitOnly.BuilderSignature && compilerOptions.declarationMap,
|
||||
inlineSourceMap: compilerOptions.inlineSourceMap,
|
||||
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
||||
onlyPrintJsDocStyle: true,
|
||||
|
||||
@@ -4648,6 +4648,7 @@ export type FilePreprocessingDiagnostics = FilePreprocessingLibReferenceDiagnost
|
||||
export const enum EmitOnly {
|
||||
Js,
|
||||
Dts,
|
||||
BuilderSignature,
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
|
||||
Reference in new issue
Block a user