从Purescript Record转换为JS对象

时间:2016-08-09 05:12:13

标签: javascript purescript

我正在尝试将Record转换为vanilla JS对象

module MyModule where

data Author = Author { name :: String, interests :: Array String }

phil :: Author
phil = Author { name: "Phil", interests: ["Functional Programming", "JavaScript"] }

从JS访问对象时

MyModule.phil

它包含我不感兴趣的其他属性(value0

{"value0":{"name":"Phil","interests":["Functional Programming","JavaScript"]}}

如何将Purescript世界的记录编组到JS?

0 个答案:

没有答案