Open f3oall opened 4 weeks ago
Might got it wrong, should deserialize()
throw an error if there's missing required properties?
deserialize does not do any validation. use cast
which does deserialize + validation https://github.com/deepkit/deepkit-framework/blob/ab96f2f3c0f7f795692d49e6a37ee5194647a9c1/packages/type/src/serializer-facade.ts#L26
When I use a wrapper function,
ValidationError
is not thrown when properties are missing.Created a repo with reproduction: https://github.com/f3oall/deepkit-deserialization
Run
bun test
, all tests should pass (but they don't). See comments in the test file for additional info.