We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dependencies] tsify-next = { version = "0.5.4" } serde = { version = "1.0.215", features = ["derive"] } wasm-bindgen = "0.2.99"
#[derive(serde::Serialize, serde::Deserialize, tsify_next::Tsify)] #[tsify(from_wasm_abi, into_wasm_abi)] pub struct TestResult { pub value: f64, } #[wasm_bindgen] pub fn test_negative_infinity() -> TestResult { TestResult { value: -f64::INFINITY, } } #[wasm_bindgen] pub fn test_positive_infinity() -> TestResult { TestResult { value: f64::INFINITY, } }
test_negative_infinity().value // null, should be -Infinity test_positive_infinity().value // null, should be Infinity
I've tried to decorate the TestResult with #[wasm_bindgen] only, it correctly returns -Infinity and Infinity respectively.
TestResult
#[wasm_bindgen]
-Infinity
Infinity
The text was updated successfully, but these errors were encountered:
Very strange indeed. I won't have time to look at this for a while, but if you wanted to investigate, a PR would be welcome!
Sorry, something went wrong.
No branches or pull requests
I've tried to decorate the
TestResult
with#[wasm_bindgen]
only, it correctly returns-Infinity
andInfinity
respectively.The text was updated successfully, but these errors were encountered: