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
Some Web APIs says “This parameter is not optional, but can be set to null”.
jsruntime does not support this for now:
a nullable parameter (ie. ?<Type>) is translated as an optional parameter
and if you remove the nullable modifier (ie. <Type>) a null value is not allowed
The easiest way to handle that would be to keep ?<Type> for optional parameter and create custom type for mandatory nullable parameter <NullableType>, eg. NullableNumber or NullableNode.
It’s a bit verbose but we can use a comptime function generator to help with that.
Maybe another solution is possible.
The text was updated successfully, but these errors were encountered:
Some Web APIs says “This parameter is not optional, but can be set to null”.
jsruntime does not support this for now:
?<Type>
) is translated as an optional parameter<Type>
) anull
value is not allowedThe easiest way to handle that would be to keep
?<Type>
for optional parameter and create custom type for mandatory nullable parameter<NullableType>
, eg.NullableNumber
orNullableNode
.It’s a bit verbose but we can use a comptime function generator to help with that.
Maybe another solution is possible.
The text was updated successfully, but these errors were encountered: