Skip to content
New issue

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

Reflect optional struct fields in typescript #1990

Merged
merged 3 commits into from
Feb 18, 2020
Merged

Reflect optional struct fields in typescript #1990

merged 3 commits into from
Feb 18, 2020

Conversation

clearloop
Copy link
Contributor

Addressed issue #1988

Rust test file:

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub struct Fields {
    pub hallo: Option<bool>,
    pub spaceboy: bool,
}

Typescript test file:

import * as wbg from '../pkg/typescript_tests';

const fields: wbg.Fields = { spaceboy: true, free: () => { } };

@clearloop
Copy link
Contributor Author

Sorry for the late, I got myself some rest last week, with my project blown up...

The latest version has no String checks, I think I probably made it, pleeeaaase check out it!

@alexcrichton alexcrichton merged commit b619070 into rustwasm:master Feb 18, 2020
@alexcrichton
Copy link
Contributor

Thanks!

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.

None yet

2 participants