Calling JavaScript from PureScript with foreign import and Effect
Bind JavaScript functions in PureScript with foreign import and Effect, then verify the generated output because FFI types are erased at runtime.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Bind JavaScript functions in PureScript with foreign import and Effect, then verify the generated output because FFI types are erased at runtime.
PureScript’s type checker validates PureScript modules, but the Foreign Function Interface treats imported JavaScript as opaque. A foreign import can declare a precise PureScript type while the underlying JavaScript returns null, undefined, or an unexpected object shape, and the compiler accepts the mismatch without complaint. The resulting failure appears o