bindings for Generator.return()

This commit is contained in:
Alexander Kryvomaz
2018-07-03 23:47:10 +03:00
parent 6e95ba20f1
commit 39d79eb037
2 changed files with 52 additions and 6 deletions

View File

@ -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.
///