0.2.0 • Published 3 years ago

@dqn/json-type v0.2.0

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

json-type

CI npm version

Generate type from JSON string.

Playground

Installation

Using npm:

$ npm install @dqn/json-type

Using yarn:

$ yarn add @dqn/json-type

Example

import type { JsonType } from "@dqn/json-type";

type Obj = JsonType<'{ "foo": "aaa", "bar": 12, "piyo": { "nyaa": [null, true] } }'>;
// type Obj = {
//   foo: "aaa";
//   bar: 12;
//   piyo: {
//     nyaa: [null, true];
//   };
// };

License

MIT

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago