From adbd34c0b9103fb05744f3afaee616165a0a9a4c Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 8 Feb 2024 18:20:46 +0800 Subject: [PATCH] fix(napi-derive): serde Number typing (#1941) --- crates/backend/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/backend/src/lib.rs b/crates/backend/src/lib.rs index 55f160c4..16881cb6 100644 --- a/crates/backend/src/lib.rs +++ b/crates/backend/src/lib.rs @@ -80,6 +80,8 @@ pub(crate) static PRIMITIVE_TYPES: &[(&str, (&str, bool, bool))] = &[ ("u8", ("number", false, false)), ("u16", ("number", false, false)), ("u32", ("number", false, false)), + // serde `Number` + ("Number", ("number", false, false)), ("u64", ("bigint", false, false)), ("i64n", ("bigint", false, false)), ("u128", ("bigint", false, false)),