[quickjs-devel] Exporting a Map/Set from a module

  • From: Luca Adrian Lindhorst <info@xxxxxxxxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Sun, 17 May 2020 20:03:10 +0200

Hey,

I tried to export a Map/Set from a module.
Using an export list didn't seem to work.
So I am trying it via JS_SetModuleExport. However I didn't get how I could
create a Map/Set via C code. I tried "emptySet = qnode_eval(ctx, "new
Set()", JS_EVAL_TYPE_GLOBAL);" which seems to just return an empty object.
I also looked into using JS_CreateObjectClass, but I don't think the class
id of Maps/Sets are exported.

Thanks
Luca

Other related posts:

  • » [quickjs-devel] Exporting a Map/Set from a module - Luca Adrian Lindhorst