Skip to content

Question about marshalling of certain types #239

Answered by ClearScriptLib
luaneko asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @phosphene47,

Thanks for your question!

ClearScript generally prefers not to convert between host and script data types, especially if the conversion is lossy, unless the lack of this conversion makes using ClearScript exceptionally painful.

To that end, it provides automatic conversion of fundamental data types only – numbers, strings, Booleans, etc. – and optional automatic conversion of nontrivial but commonly used data types such as date-times and tasks/promises. Everything else is marshaled by proxy; that is, the recipient gets a local object that represents something on the other side of the host-script boundary. The proxy holds a strong reference and provides access to its re…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luaneko
Comment options

Answer selected by luaneko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants