Closed
Description
π Search Terms
explicit .ts
file extension
β Viability Checklist
- 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 our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
β Suggestion
Add a config option to write explicit .ts
file extension in typescript project, and let the compiled file to have .js
extension.
π Motivating Example
It feels wrong to import .ts
file as .js
file in typescript project.
π» Use Cases
-
What do you want to use this for?
I want to write explicit
.ts
file extension in typescript project, and let the compiled file to have.js
extension. -
What shortcomings exist with current approaches?
It feels wrong to import
.ts
file as.js
file in typescript project. -
What workarounds are you using in the meantime?
Write
.js
file extension in typescript project.