1.1.7 • Published 2 years ago

@dellarosamarco/json-2-ts v1.1.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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);
1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago