Dmytro Z.

Results 86 comments of Dmytro Z.

Why? `typeof` just checks types, without coercions or other things. I think it will be enough to add `bigint` here: ``` const TYPES = ["undefined", "string", "number", "object", "function", "boolean",...

I will come back to this issue a bit later. On 20.05.2022 09:42, Evgeny Poberezkin wrote: > Why? > > well, because none of the keywords you expect to work...

If type is set to bigint - value should be coerced to BigInt, if cortcion is enabled. So, it would be nice to implement this things: 1. type "integer" should...

For coercion - i think, if type is specified as "integer" or "number" - it shouldn't coerced to BigInt. Coercion should happen only when user explicitly specified, that he expected...

So, ideally: - integer, number - recognize and validate BigInt, but only if BigInt is not exceeded Number.MAX_SAFE_NUMBER, coerce BigInt to Number; - new type "bigint" - coerce strings and...

How do you want to implement it? Add new keyword `bigint`, which can be used together with the `integer` or `number` types? ``` type: "integer", bigint: true, ``` With bigint...

Ah, ok. This setting will allow numbers / integers to accept bigint type. Why not to do this silently, without additional options? But how coercion can be implemented in the...

We shouldn't mix Number and BigInt types, because they are not compatible internally. User should have possibility to specify explicitly what data type he is expected (number or bigint). With...

Seems, that your are right, but I am not PPI expert and I am not sure, that this change will not affect something other.

This issue is 8 years old, seems that it is not actual already. I cleaned my issues list from garbage.