Created
March 8, 2018 15:16
-
-
Save eric-corumdigital/945cb1a53f1c863b6c7e8f54c4daf348 to your computer and use it in GitHub Desktop.
PureScript Foreign Non-Plain Object Import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import foreign data XImpl :: Type | |
type X = { a :: Number, b :: Number, impl :: XImpl } | |
foreign import foo :: forall eff. Eff eff X | |
--- | |
exports.foo = function() { | |
var x = doFoo(); | |
return { a: x.a, b: x.b, impl: x }; | |
}; |
Author
eric-corumdigital
commented
Mar 8, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment