mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
bindings for Generator.return()
This commit is contained in:
@ -374,6 +374,12 @@ extern "C" {
|
||||
extern {
|
||||
pub type Generator;
|
||||
|
||||
/// The return() method returns the given value and finishes the generator.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator/return
|
||||
#[wasm_bindgen(method, structural, js_name = return)]
|
||||
pub fn gen_return(this: &Generator, value: &JsValue) -> JsValue;
|
||||
|
||||
/// The next() method returns an object with two properties done and value.
|
||||
/// You can also provide a parameter to the next method to send a value to the generator.
|
||||
///
|
||||
|
Reference in New Issue
Block a user