Seth Madison
05/01/2023, 10:36 PMSeth Madison
05/01/2023, 10:41 PMJSON.parse to produce a dynamic, and then unsafeCast it to an exported class. This works great, and allows for code sharing across targets (contrasted with external interface). This looks like:
The problem is that you end up with an incomplete instance of the class, and so if there are extension functions defined on the class, they’ll crash at runtime.
I would like to define a JsExport class that cannot receive extensions so that users of the class don’t accidentally write code that will crash at runtime!Jan
05/05/2023, 7:28 PM