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

1.1.7 • Public • Published

Installation

npm i --save @dellarosamarco/json-2-ts

Package.json

"devDependencies": {
    "@dellarosamarco/json-2-ts": "^1.1.4"
}

Usage

import { JsonReader } from "@dellarosamarco/json-2-ts";
import * as fs from "fs";

const data = {
    "id" : "640e2a4f3bb10c4d5924b377",
    "isActive" : true,
    "tags" : [
      {
        "id" : 1,
        "name" : "entertainment"
      },
      {
        "id" : 2,
        "name" : "simulation"
      }
    ],
    ...
}

const interfaces = JsonReader.convert(data);
// (string) → export interface ...

fs.writeFile("./types.d.ts", interfaces);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.71latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.71
1.1.61
1.1.51
1.1.41
1.1.32
1.1.21
1.1.11
1.1.01
1.0.91
1.0.81
1.0.71
1.0.61
1.0.51
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01

Package Sidebar

Install

npm i @dellarosamarco/json-2-ts

Homepage

json2ts.app

Weekly Downloads

19

Version

1.1.7

License

ISC

Unpacked Size

11.6 kB

Total Files

26

Last publish

Collaborators

  • dellarosamarco