samchon / typia

Super-fast/easy runtime validators and serializers via transformation
https://typia.io/
MIT License
4.45k stars 153 forks source link

Make clear that Typia does not perform class conversion #869

Closed a-kla closed 3 weeks ago

a-kla commented 9 months ago

Example

⏯ Playground Link <= first take a look at this

Feature Request

Please update the Documentation and point out that Typia only works well with primitive types.

It's frustrating if you use a Validator to prevent runtime errors but just get them on another unexpected Place.

It's known that Typia don't work with classes (creates a Object without the methods). @ https://github.com/samchon/nestia/issues/431

Current nestia does not performan class conversion, and recommends to use pure interface type instead.

But no Words about it in the Typia Documentation.

And I don't understand why typia.createRandom<Date>() returns to a valid Date class but typia.json.assertParse<Date>(new Date().toISOString()); asserts a string as Date.

samchon commented 9 months ago

Got it, will write the word that typia is not write the intanceof statement.

samchon commented 9 months ago

image

New section "Restriction" would be newly added at v5.3 update

AlexRMU commented 3 weeks ago

Close as completed?