3 ms·
Can I, in Elm, bring over my couple dozen NPM modules I use in my projects? At least what TypeScript has going for it, if not a more robust type system, is inte
by JMTQp8lwXL 7y ago
Can I, in Elm, bring over my couple dozen NPM modules I use in my projects? At least what TypeScript has going for it, if not a more robust type system, is interoperability with all the other tools I need to build web applications.
- frenchyatwork 7y agoYou can.
- zachrose 7y agoMaybe not in the way JMTQ is expecting. You could bring your npm modules over and call them through Elm ports, but you’ll still have to declare type signatures of those ports and have a bit of ceremony about calling them. It might be better to ask what those npm packages are doing, exactly. There’s a decent chance that either the npm package is filling a shortcoming of the JS standard library (e.g. moment) where that shortcoming doesn’t exist in Elm, or an equivalent Elm package exists.