@dqn/json-type
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @dqn/json-type

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

12.8 kB

Total Files

17

Last publish

Collaborators

  • dqn