Skip to content

Conversation

@Yoorkin
Copy link
Contributor

@Yoorkin Yoorkin commented Feb 10, 2025

Optional[A] is a type that represents a JavaScript value which can be of type A or undefined. It's useful for JS FFI bindings when the JavaScript function requires an optional argument:

extern "js" fn Render2DContext::fill_text(content : String, width : Optional[Int]) = "..."

@Yoorkin Yoorkin requested a review from rami3l February 10, 2025 03:57
@Yoorkin Yoorkin merged commit aa74f44 into main Feb 10, 2025
4 checks passed
@rami3l rami3l deleted the optional-type branch February 10, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants