mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 13:01:22 +00:00
Port WeakMap
tests to wasm
This commit is contained in:
@ -2253,28 +2253,28 @@ extern "C" {
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/set
|
||||
#[wasm_bindgen(method, js_class = "WeakMap")]
|
||||
pub fn set(this: &WeakMap, key: Object, value: JsValue) -> WeakMap;
|
||||
pub fn set(this: &WeakMap, key: &Object, value: JsValue) -> WeakMap;
|
||||
|
||||
/// The get() method returns a specified by key element
|
||||
/// from a [`WeakMap`] object.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/get
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn get(this: &WeakMap, key: Object) -> JsValue;
|
||||
pub fn get(this: &WeakMap, key: &Object) -> JsValue;
|
||||
|
||||
/// The `has()` method returns a boolean indicating whether an element with
|
||||
/// the specified key exists in the [`WeakMap`] object or not.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/has
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn has(this: &WeakMap, key: Object) -> bool;
|
||||
pub fn has(this: &WeakMap, key: &Object) -> bool;
|
||||
|
||||
/// The `delete()` method removes the specified element from a [`WeakMap`]
|
||||
/// object.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/delete
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn delete(this: &WeakMap, key: Object) -> bool;
|
||||
pub fn delete(this: &WeakMap, key: &Object) -> bool;
|
||||
}
|
||||
|
||||
// WeakSet
|
||||
|
Reference in New Issue
Block a user