typia icon indicating copy to clipboard operation
typia copied to clipboard

Make clear that Typia does not perform class conversion

Open a-kla opened this issue 2 years ago • 2 comments

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.

a-kla avatar Nov 13 '23 17:11 a-kla

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

samchon avatar Nov 14 '23 04:11 samchon

image

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

samchon avatar Nov 18 '23 23:11 samchon

Close as completed?

AlexRMU avatar Aug 14 '24 18:08 AlexRMU