-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
✨ Feature – Allow interop with JS or TS #22
Comments
Is there a way we could create something like an
|
Hey there 👋 100% agree on adding Elm Land will still use the If you're interested, you should definitely join the Discord channel and share more of your pain points there! ( I mostly use GitHub issues to track planned work, and am slower to see comments here ) |
Thanks for the tip, I'll consider it! As to your point about the interop JS file and to clarify how you would implement the environment variable parsing, is this your plan?
If that is the flow you had in mind, I still don't understand why the interop JS is required since we could just pass the environment variables into a record to all page init constructors. I guess I also don't understand the point about web components, why would they need access to flags? Perhaps it's just a big misunderstanding on my part 🙈! |
Both TypeScript support and |
Problem
Elm supports interop with JavaScript via flags, ports, and web components. It is not clear in the guide how working with those things is possible with Elm Land.
Solution
The high-level idea is to allow users to create an
src/interop.js
file in their project that looks like this:This is currently supported in JavaScript, but I need to explore how involved
src/interop.ts
would be. Mainly I'm interested in whether supporting Typescript will require extra configuration, build steps, or have serious performance impact.The text was updated successfully, but these errors were encountered: