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
I want to add struct,like this:
struct User { username: String, email: String, sign_in_count: u64, active: bool, } fn build_user(email: String, username: String) -> User { User { email, username, active: true, sign_in_count: 1, } } impl User{ fn introduce(self){ println!("{} {}",self.username,self.email) } }
and I want to use User in JS , like this
let user=new User("Jason","[email protected]",false,10); user.introduce();
how to do it? thanks!
The text was updated successfully, but these errors were encountered:
maybe need support JS_NewClass? Consider implementing this data type?
Sorry, something went wrong.
Correct. This is not implemented yet.
No branches or pull requests
I want to add struct,like this:
and I want to use User in JS , like this
how to do it? thanks!
The text was updated successfully, but these errors were encountered: