-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Description
π Search Terms
transpileDeclaration source map declarationmap
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
No response
π» Code
const {config} = ts.readConfigFile(project, ts.sys.readFile);
const basePath = path.resolve(path.dirname(project));
const {
options,
fileNames: rootNames,
} = ts.parseJsonConfigFileContent(config, ts.sys, basePath);
const program = ts.createProgram({
rootNames,
options,
host: ts.createCompilerHost(options),
});
const sourceFiles = program.getSourceFiles();
for (const sourceFile of sourceFiles) {
const declarationFile = ts.transpileDeclaration(sourceFile.text, {
compilerOptions: options,
fileName: sourceFile.fileName,
});
console.log(declarationFile.sourceMapText);
}
π Actual behavior
If the TSConfig contains "declarationMap": true
, sourceFileText
is undefined
.
π Expected behavior
If the TSConfig contains "declarationMap": true
, sourceFileText
contains the declaration source map.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
No labels