You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedefTypeToWrite= {
varvalues:Array<EntrypointItem>
};
// This custom writer should be respected but is IGNORED for this abstract
@:jcustomwrite(package.Writers.writeEntrypointItem)
abstractEntrypointItem(Either<String, EntrypointObject>) from Either<String, EntrypointObject> to Either<String, EntrypointObject> {}
I want the values to be written, and parsed, as either a String or an EntrypointObject (which is a typical typedef), detecting what type it is.
There's also the problem that, when implementing writeEntrypointItem, there's no easy way to tell the writer to "write this object" instead of returning a string; you can JSON stringify the value you want to return, but that breaks the indentation of the file.
The text was updated successfully, but these errors were encountered:
Here is an example of what I am trying to do:
I want the values to be written, and parsed, as either a String or an EntrypointObject (which is a typical typedef), detecting what type it is.
There's also the problem that, when implementing
writeEntrypointItem
, there's no easy way to tell the writer to "write this object" instead of returning a string; you can JSON stringify the value you want to return, but that breaks the indentation of the file.The text was updated successfully, but these errors were encountered: