Ivan Tymoshenko

Results 122 comments of Ivan Tymoshenko

It's an interesting example https://github.com/fastify/fast-json-stringify/blob/03f8714fc2412c3e46cb7bbb947e316cad0681bc/test/date.test.js#L129 `moment` is an object. It's not an instance of `Date` . It has toJSON method. Should we call it?

Yes, it's WIP. 1) I need to fix toJSON check in asTypeNullable functions. toJSON should be called before checking for a null value, but we shouldn't call toJSON twice: in...

If someone would like to help with this issue, I would appreciate it. Working on another problem right now.

What if few of them match?

We need to declare somewhere that the order is important in this case.

Another unclear case. If I define a typed property it will always coerce the value to the defined type, if I add another type, coercion will not work. ```js test('integer...

`oneOf` has the same issue. It doesn't coerce type by default.

So this is the correct behavior? https://github.com/fastify/fast-json-stringify/issues/450#issuecomment-1143448071