• Stars
    star
    4,547
  • Rank 9,367 (Top 0.2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 2 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Super-fast/easy runtime validators and serializers via transformation

Typia

Typia Logo

GitHub license npm version Downloads Build Status Guide Documents

// RUNTIME VALIDATORS
export function is<T>(input: unknown): input is T; // returns boolean
export function assert<T>(input: unknown): T; // throws TypeGuardError
export function validate<T>(input: unknown): IValidation<T>; // detailed

// JSON FUNCTIONS
export namespace json {
    export function application<T>(): IJsonApplication; // JSON schema
    export function assertParse<T>(input: string): T; // type safe parser
    export function assertStringify<T>(input: T): string; // safe and faster
}

// PROTOCOL BUFFER
export namespace protobuf {
    export function message<T>(): string; // Protocol Buffer message
    export function assertDecode<T>(buffer: Uint8Array): T; // safe decoder
    export function assertEncode<T>(input: T): Uint8Array; // safe encoder
}

// RANDOM GENERATOR
export function random<T>(g?: Partial<IRandomGenerator>): T;

Typia is a transformer library supporting below features:

  • Super-fast Runtime Validators
  • Enhanced JSON functions
  • Protocol Buffer encoder and decoder
  • Random data generator

Note

  • Only one line required, with pure TypeScript type
  • Runtime validator is 20,000x faster than class-validator
  • JSON serialization is 200x faster than class-transformer

Sponsors

Thanks for your support.

Your donation encourages typia development.

Sponsers

Playground

You can experience how typia works by playground website:

Guide Documents

Check out the document in the website:

🏠 Home

📖 Features

🔗 Appendix

More Repositories

1

nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
TypeScript
1,814
star
2

backend

A template repository for TypeScript backend server
TypeScript
639
star
3

tstl

TypeScript-STL (Standard Template Library, migrated from C++)
TypeScript
603
star
4

prisma-markdown

Markdown generator of Prisma, including ERD and descriptions
TypeScript
432
star
5

payments

Korean Payment System with Mockup servers of PGs
TypeScript
332
star
6

safe-typeorm

TypeORM helper library enhancing safety in the compilation level
TypeScript
227
star
7

tgrid

TypeScript RPC (Remote Procedure Call) for WebSocket and Worker protocols
TypeScript
142
star
8

fake-iamport-server

Fake Iamport Server with Real SDK
93
star
9

framework

Deprecated, use TGrid instead
C++
71
star
10

resume

CSS
53
star
11

astl

Standard Template Library for AssemblyScript
TypeScript
38
star
12

nestia-helper

NestJS helper with Type level
TypeScript
34
star
13

mutex

Mutex Server using WebSocket
TypeScript
29
star
14

openapi

OpenAPI definitions, converters and LLM function calling application composer.
TypeScript
28
star
15

bbs-backend

Simple Bullet-in Board System Backend
TypeScript
24
star
16

sxml

Simple XML Library for TypeScript (JavaScript)
TypeScript
16
star
17

nestia-start

Nestia template project installed by "npx nestia start"
TypeScript
16
star
18

fast-object

Fast object creator, via JSON.parse(), but type safe
TypeScript
16
star
19

shopping-backend

Shopping Mall Backend Server made by NestJS + Prisma for Education
TypeScript
11
star
20

websocket-polyfill

WebSocket class from Browser to NodeJS
TypeScript
11
star
21

ecol

Event Collections
TypeScript
9
star
22

samchon

8
star
23

json-translator

Translate JSON file via Google Translate API with optimization strategies
TypeScript
6
star
24

cagen

Number of Case Generator
TypeScript
5
star
25

schedules

Open source development schedule of Samchon
5
star
26

big-associative

Big associative containers who can store over 14M elements.
TypeScript
5
star
27

encrypted-fetcher

Rest API Fetcher with AES Encryption
TypeScript
4
star
28

typedoc-plugin-exclude-references

temporary plug-in
TypeScript
4
star
29

environments

My development environments
4
star
30

import2

lazy import function who can prevent transpiled to require
JavaScript
4
star
31

tgrid.project.chat

Demo Project - Chat Application
TypeScript
4
star
32

safeorm

Ultimate Safe ORM for the TypeScript
TypeScript
4
star
33

nestjs-websocket-example

Example WebSocket server of NestJS with Nestia
TypeScript
3
star
34

nestia-fetcher

Fetcher library for the Nestia
TypeScript
3
star
35

oss-2019

공개소프트웨어 개발자대회 2019
CSS
2
star
36

URLVariables

URLVariables class for TypeScript
TypeScript
2
star
37

nestjs-custom-decorator-exception-filter

2
star
38

nestjs-study-router-module

To support RouterModule in Nestia
TypeScript
1
star
39

prisma-bug-report-postgres-timestampz

A prisma bug reproduction repo for reporting about `timestampz` type in Postgres
1
star
40

nestia-auto-crud-example

For https://github.com/samchon/nestia/issues/670
TypeScript
1
star
41

tgrid.com

Guide Documents for TGrid
HTML
1
star
42

tgrid.projects.market

Demo Project - Grid Market
TypeScript
1
star
43

gitbook-plugin-hide-navigation-buttons

Gitbook Plugin: Hide Navigation Buttons
CSS
1
star
44

timetable

Hansung Timetable
ActionScript
1
star
45

tgrid.examples

Example Source Codes for TGrid
TypeScript
1
star
46

samchon.github.io

My homepage
HTML
1
star
47

gitbook-plugin-scroll-to-top

JavaScript
1
star
48

ts-patch-typescript-v5.3-test

JavaScript
1
star
49

nestia-sdk-template

Nestia SDK Template Repository for `@nestia/migrate`
TypeScript
1
star