Repository navigation
Conversation
|
Deploy preview for babel ready! Built with commit 3db491e |
|
@loganfsmyth can you help review this PR? |
|
besides the extension I guess there is not much use for the filename, right? Why don't we just change the filename internally when the typescript preset is on? |
|
@danez According to @nicolo-ribaudo changing the filename is the preferred solution, though I cannot tell the what's the preferred way to change it. My thought is the filename might play a role in scenarios other than typescript, maybe in the future. So an option to allow user to manually change filename might be better than hard-coded to fit typescript in a sense it's future proof. |
|
With all due respect, this issue has been bikeshedded for a whole year. People just want typescript compilation to work in repl, that's all. Whatever conclusion you guys come to, I'll respect that and change my implementation accordingly. But please, don't leave this pending like before. |
|
It depends how much we want the REPL to illustrate/educate the differences between the functionality of presets and If we want TS to just work, then my initial reaction is to just change the filename internally. (FWIW, just because it's been an open issue hardly means it's been bikeshedded, and as far as I know we actually haven't discussed this much.) |
|
Lines 90 to 93 in 4459be5 If I understand it right, for the current state of repl, changing ln:92 to |
|
No, that would prevent |
|
This is cool, but my hesitation is that it is extremely unlikely a user is going to know to change the filename (especially if we don't have an error message for it). It just looks like it doesn't work. So I would suggest the "Why don't we just change the filename internally when the typescript preset is on?" suggestion (exposing the filename is fine but seems unnecessary in a repl, especially if it doesn't do anything else). There's limited space for options and it's just for testing, in this environment/scenario everything should probably just work with the least changing/config possible. |

fix #1666, fix babel/babel#8117
the long pending issue that breaks typescript compilation