0.0.5 • Published 1 year ago

@hoseung.json/schema v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago
$ npm install @hoseung.json/schema
import { S } from "@hoseung.json/schema";

// {
//   type: "object",
//   properties: {
//     id: { type: "number" },
//     name: { type: "string" }
//   }
//   required: ["id", "name"]
// }
const User = S.Object({
  id: S.Number(),
  name: S.String(),
});

// {
//   id: number;
//   name: string;
// }
type User = S.Resolve<typeof User>;
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago