json-type
Generate type from JSON string.
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