2 ms·
No, deno mandates the extension. The no extension shortcut as well as the index file shortcut have not been included in deno as a learning from node, which in
by davnicwil 5y ago
No, deno mandates the extension.
The no extension shortcut as well as the index file shortcut have not been included in deno as a learning from node, which in my view is probably a wise move - keep it super simple by just specifying the exact filename.
- eins1234 5y agoExactly this. Deno is designed to align with web module semantics, and omitting the extension is only really feasible when resolving modules on disk where roundtrip times are short and looking for multiple extensions in parallel is cheap. Deno, as well as the web, supports module resolution across the internet, where this resolution strategy would become prohibitively expensive.
- kybernetikos 5y agoDeno's position is much more sensible than the typescript teams position, but not working with the rest of the TS ecosystem is a huge price to pay. I hope that either Deno implements some 'legacy' way of working that is compatible with the way the official typescript team do it, or the typescript team realize the error of their ways. I'm not sure if that's likely to happen short of a fork though.