# json2ts **Repository Path**: codefarmer_admin/json2ts ## Basic Information - **Project Name**: json2ts - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-21 - **Last Updated**: 2024-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 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); ```