mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-17 02:30:50 +00:00
Add extends to js-sys:Intl.PluralRules
This commit is contained in:
parent
ee131888da
commit
1762b3cba0
@ -3546,7 +3546,7 @@ pub mod Intl {
|
||||
/// that enable plural sensitive formatting and plural language rules.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules
|
||||
#[wasm_bindgen(js_namespace = Intl)]
|
||||
#[wasm_bindgen(extends = Object, js_namespace = Intl)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub type PluralRules;
|
||||
|
||||
|
@ -87,6 +87,10 @@ fn plural_rules() {
|
||||
assert!(r.resolved_options().is_instance_of::<Object>());
|
||||
assert_eq!(r.select(1_f64), "one");
|
||||
|
||||
let r = Intl::PluralRules::supported_locales_of(&locales, &opts);
|
||||
assert!(r.is_instance_of::<Array>());
|
||||
let a = Intl::PluralRules::supported_locales_of(&locales, &opts);
|
||||
assert!(a.is_instance_of::<Array>());
|
||||
|
||||
assert!(r.is_instance_of::<Intl::PluralRules>());
|
||||
assert!(r.is_instance_of::<Object>());
|
||||
let _: &Object = r.as_ref();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user