i have some code that used to work for doing this (albeit that i always meant to change it as the TODO comment shows):
// string conversions should be done on the Purescript side for type safety and totality reasons TODO
if(thing instanceof PS["Module Name"].A) {
// do something typically heinous in JS
}
but now i’m using Webpack and while i can require in the module i never get my instanceOf to work - even when i can plainly see that the thing is an A
Is instanceOf even the right way to be doing this? should i just knuckle down and do the conversion from a PS type to stringly-typed thing on the PS side?
any thoughts, comments appreciated…