Stream: ComponentizeJS

Topic: Options Enums and Result Representation


view this post on Zulip Mariano Guerra (Aug 16 2023 at 15:01):

hi, following the example and trying to adapt it to a wit file I have, I can't find how to represent enums, option and result, is it possible?

update: returning null works as none and something as some(t)

view this post on Zulip Mariano Guerra (Aug 16 2023 at 15:29):

update2: just noticed the test folder :man_facepalming:

view this post on Zulip Mariano Guerra (Aug 16 2023 at 15:34):

update 3: to return the E in result(T, E) you have to throw an exception with the exception being the value


Last updated: Dec 23 2024 at 12:05 UTC