Use js_sys::Array, generate _n methods for ergonomics

This commit is contained in:
Anton Danilkin
2018-09-11 00:37:59 +03:00
parent 14eb317509
commit 9f4ed536df
3 changed files with 53 additions and 36 deletions

View File

@ -137,8 +137,8 @@ fn builtin_idents() -> BTreeSet<Ident> {
BTreeSet::from_iter(
vec![
"str", "char", "bool", "JsValue", "u8", "i8", "u16", "i16", "u32", "i32", "u64", "i64",
"usize", "isize", "f32", "f64", "Result", "String", "Box", "Vec", "Option",
"ArrayBuffer", "Object", "Promise", "Function",
"usize", "isize", "f32", "f64", "Result", "String", "Vec", "Option",
"Array", "ArrayBuffer", "Object", "Promise", "Function",
].into_iter()
.map(|id| proc_macro2::Ident::new(id, proc_macro2::Span::call_site())),
)