Open hanakannzashi opened 9 months ago
While I agree with the simplicity from the theoretical point of view, the reality is that I've seen people always use number
for number
, but the same people would use BN.js
or strings
for big values.
To be honest, I think we would break more things that we would fix by doing this (thought I might be wrong)
When schema is
u64
oru128
, the input value type can benumber
,bigint
,string
,boolean
. But when schema isu8
,u16
,u32
, the input value type can only benumber
, they are not consistent, that is strange.I think we should make input value type be strict when serialize
u64
oru128
, I mean ONLY allowbigint
. Alternatively, we should make input type NOT be strict when serializeu8
,u16
,u32
, I mean allownumber
,bigint
,string
andboolean