Skip to content
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

Enable declarationMap for the typescript project itself #45984

Open
5 tasks done
Andarist opened this issue Sep 21, 2021 · 2 comments
Open
5 tasks done

Enable declarationMap for the typescript project itself #45984

Andarist opened this issue Sep 21, 2021 · 2 comments
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript

Comments

@Andarist
Copy link
Contributor

Suggestion

πŸ” Search Terms

source maps, enable, sourcemaps, declarationmap

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

It would be quite nice if typescript would be shipped with declaration maps. This could help with debugging TS itself.

πŸ“ƒ Motivating Example

Debugging with https://replay.io/ .

πŸ’» Use Cases

I'm currently debugging the inference algorithm to understand it better. However, TS uses a lot of bitmasks, and reading the final code output is not as informative as it could be. TS source code also contains a lot of useful comments that could help during the debugging sessions.

@MartinJohns
Copy link
Contributor

Duplicate of #32207.

@andrewbranch
Copy link
Member

Declaration maps (--declarationMap) are source maps from .d.ts files to .ts files, while when we normally talk about β€œsource maps,” we mean source maps from .js files to .ts files (--sourceMap). Which one are you referring to @Andarist?

@sandersn sandersn added Suggestion An idea for TypeScript Needs More Info The issue still hasn't been fully clarified labels Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants