The real problem is not TypeScript is not type-safe, but many validation libraries was not made with IDE friendliness in mind.
TypeScript is as type-safe as IDE can be (might be in actuality lower than that), but we can always raise the bar.
I currently use JSON-schema-based jsonschema-definer. (Used to use zod.) JSON schema definitions are quite vast and well written, as well as work well with Swagger. JSON schema as well as Swagger are supposed to be cross language as well. The library also extended it with .custom() function as in case.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The real problem is not TypeScript is not type-safe, but many validation libraries was not made with IDE friendliness in mind.
TypeScript is as type-safe as IDE can be (might be in actuality lower than that), but we can always raise the bar.
I currently use JSON-schema-based jsonschema-definer. (Used to use zod.) JSON schema definitions are quite vast and well written, as well as work well with Swagger. JSON schema as well as Swagger are supposed to be cross language as well. The library also extended it with
.custom()
function as in case.