Skip to content

zhy0216/jttd

Repository files navigation

jttd

JSON TypeScript Type Definition

The idea is to represent typescript's type information in json format. With this json:

  • tsc can do runtime type check
  • dependency injection with type
  • ORM
  • api client generation

spec

see the type.ts

TODO:

feature type -> json validation
primitive type (0.1)
null or undefined
number
boolean
string
enum 🟨 🟨
literal
objects
date? 🔜 🔜
array (0.1)
tuple (0.1) 🔜 🔜
object (0.1)
function
interface (0.1)
class? 🟨 🟨
type operator
union (0.1)
intersection (0.1)
?: optional property
readonly
keyof
typeof
index access
condition type
mapped type
template literal
generics
infer

[ ] use official custom transformer plugin: microsoft/TypeScript#54276

Acknowledge

About

JSON TypeScript Type Definition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published