Transformer

Typia Logo

Guide Documents · Playground (Online IDE) · Github Repository

typia is a transformer library converting TypeScript types to runtime function.

If you call one of the typia function, it would be compiled like below. This is the key concept of typia, transforming TypeScript type to a runtime function. The typia.is<T>() function is transformed to a dedicated type checker by analyzing the target type T in the compilation level.

This feature enables developers to ensure type safety in their applications, leveraging TypeScript’s static typing while also providing runtime validation. Instead of defining additional schemas, you can simply utilize the pure TypeScript type itself.

//----
// examples/checkString.ts
//----
import typia, { tags } from "typia";
export const checkString = typia.createIs<string>();
 
//----
// examples/checkUUID.js
//----
import typia from "typia";
export const checkString = (() => {
  return (input) => "string" === typeof input;
})();

Key Features



Super-fast Runtime Validator

typia.assert<T>(input)


20,000x faster than class-validator.


Stable than any others, and only one supporting complicate union type.


In the backend server side, it boosts up performance about 10x up.


Sponsors

Thanks for your support.

Your donation encourages typia development.

Also, typia is re-distributing half of donations to core contributors of typia.

Sponsers