-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Fix ts.transpileDeclaration having empty sourceMapText when declarationMap is true #59314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -205,7 +205,7 @@ function transpileWorker(input: string, transpileOptions: TranspileOptions, decl | |||
| addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics()); | ||||
| } | ||||
| // Emit | ||||
| const result = program.emit(/*targetSourceFile*/ undefined, /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ declaration, transpileOptions.transformers, /*forceDtsEmit*/ declaration); | ||||
| const result = program.emit(/*targetSourceFile*/ undefined, /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnly*/ undefined, transpileOptions.transformers, /*forceDtsEmit*/ undefined); | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before we were passing TypeScript/src/compiler/emitter.ts Line 907 in f37482c
though I'm not sure if this is actually the correct fix. Perhaps it would be to just remove !forceDtsEmit && from emitter.ts.
Changing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, no permutation of what I said results in all the tests passing, so clearly not as easy of a fix as I hoped. |
||||
|
|
||||
| addRange(/*to*/ diagnostics, /*from*/ result.diagnostics); | ||||
|
|
||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being set to
undefinedcauseddeclarationMapto be set toundefinedin optionsTypeScript/src/services/transpile.ts
Lines 130 to 137 in f37482c