this post was submitted on 14 Jan 2024
8 points (100.0% liked)

TypeScript

798 readers
1 users here now

founded 1 year ago
MODERATORS
 

Typia is a transformer library supporting:

  • Super-fast Runtime Validators
  • Enhanced JSON functions
  • Protocol Buffer encoder and decoder
  • Random data generator
top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 6 months ago (1 children)

Looks good so far. How do I get it to play nice with jest / ts-jest ?

[–] [email protected] 1 points 6 months ago (1 children)

Oh, I get it. It's like a tech demo, to encourage Microsoft to add compiler plugins. Can't really use it on a project of any scale, due to every other tool also providing its own TS compiler, again because TSC doesn't support plugins.

[–] [email protected] 2 points 6 months ago (1 children)

I use it in the code generator mode (https://typia.io/docs/setup/#generation) that doesn't require the tsc plugin integration and works well with other build tools (in my case esbuild) and arbitrary testing/code-coverage libraries.

[–] [email protected] 1 points 6 months ago (1 children)

Oh, you just add it as a separate task in package.json? That seems nicer than converting all your type defs manually to io.ts format or similar.

[–] [email protected] 1 points 6 months ago

Yes, that mode works pretty well. In my case I don't really own the types (they come from a third party source) so being able to to auto generate validators from them is very convenient.