All Projects → richie-south → Typescript Type Generator

richie-south / Typescript Type Generator

Licence: mit
Generate interfaces on the go! Network request? Then generate interfaces for response!

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
types
53 projects

Projects that are alternatives of or similar to Typescript Type Generator

Tygit
A basic terminal interface for git, written on Node.js [Project not maintained]
Stars: ✭ 36 (+227.27%)
Mutual labels:  npm, interface
React Planner
✏️ A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
Stars: ✭ 846 (+7590.91%)
Mutual labels:  interface
Upboard ros
ROS nodes for upboard usage
Stars: ✭ 22 (+100%)
Mutual labels:  interface
Sass A11ycolor
🌈 Generate the nearest accessible color with Sass.
Stars: ✭ 24 (+118.18%)
Mutual labels:  npm
Functions.js
📦 A hub of numerous functions with various functionalities
Stars: ✭ 22 (+100%)
Mutual labels:  npm
Ax5ui Uploader
jQuery file uploader, HTML5(IE9+, FF, Chrome, Safari) - http://ax5.io/ax5ui-uploader/
Stars: ✭ 25 (+127.27%)
Mutual labels:  npm
Autodeploy
🚀 Autodeploy is a small and highly customizable CLI-Tool to automatically deploy your git repo and execute arbitrary commands/scripts after a specific git action (e.g. push, merge, ...)
Stars: ✭ 20 (+81.82%)
Mutual labels:  npm
Yarn Package Boilerplate
An Yarn package with babel, jest, flow, prettier and more
Stars: ✭ 10 (-9.09%)
Mutual labels:  npm
Autoupdate
Library autoupdate tool 🎰
Stars: ✭ 8 (-27.27%)
Mutual labels:  npm
Interactive Git Tag
Interactive tool that helps with your git tagging by suggesting versions
Stars: ✭ 24 (+118.18%)
Mutual labels:  npm
Snm
🤏 Smol Node Manager written in Rust
Stars: ✭ 24 (+118.18%)
Mutual labels:  npm
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (+100%)
Mutual labels:  interface
Instagramfirstcommenter
This bot will post a predefined comment as fast as possible to a new post on the target profile. I used this to successfully win tickets for a big music festival.
Stars: ✭ 26 (+136.36%)
Mutual labels:  npm
Fake Tag
A fake template literal tag to trick syntax highlighters, linters and formatters into action.
Stars: ✭ 22 (+100%)
Mutual labels:  npm
Feign
Feign makes writing java http clients easier
Stars: ✭ 7,681 (+69727.27%)
Mutual labels:  interface
Jet Bridge
Jet Bridge – Admin Panel Framework for your application
Stars: ✭ 904 (+8118.18%)
Mutual labels:  interface
Preppy
A simple and lightweight tool for preparing the publish of NPM packages.
Stars: ✭ 23 (+109.09%)
Mutual labels:  npm
Unreset.css
Unreset CSS restores browsers' default element styles which are reset by Eric Meyer's Reset CSS, YUI 3 Reset CSS, HTML5 Reset Stylesheet of HTML5 Doctor, or Tim Murtaugh's HTML5 Reset.
Stars: ✭ 24 (+118.18%)
Mutual labels:  npm
Smartphoto
The most easy to use responsive image viewer especially for mobile devices
Stars: ✭ 858 (+7700%)
Mutual labels:  npm
Element
Programmatic UI for macOS
Stars: ✭ 855 (+7672.73%)
Mutual labels:  interface

typescript-type(interface)-generator

Generate interfaces form javascript objects

install

npm install typescript-interface-generator

example

import { createInterfacesFromObject } from 'typescript-interface-generator'

const code = createInterfacesFromObject(
  'User',
  {
    id: 1,
    data: {
      name: 'Richard',
      articles: [
        {
          id: 0,
          title: 'article 0',
        },
        {
          id: 0,
          title: 'article 0',
        },
        {
          anotherObject: 10,
        },
      ],
    },
  }
)

console.log(code)
/**
 ** CODE OUTPUT **

 interface User {
    id: number;
    data: Data;
  }

  interface Data {
    name: string;
    articles: Array<Articles | Articles1>;
  }

  interface Articles {
    id: number;
    title: string;
  }

  interface Articles1 {
    anotherObject: number;
  }
 */

API

createInterfacesFromObject

Takes a name and a javascript object and returns a string with typescript interfaces

Syntax

  import { createInterfacesFromObject } from 'typescript-interface-generator'

  createInterfacesFromObject('NAME', {})

Parameters

  • string
    • name of (parent) interface
  • object
    • object that should be turned to interfaces

Return value

string: contains typescript interfaces

gif example

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].