Git Product home page Git Product logo

typescript-types-separator's Introduction

Break your single Types file into many separate ones

This lib was built to help out when you want to keep a certain standard for your type files, but they are generated by a tool that does not support separating a single type per file. A concrete example is that when I was building a service using OpenAPI yaml, I wanted to code once, and have my typescript files updated. But the tool to output the types only does it for a single file.

Usage

You can use a config file currently to setup source and output. Just place a json file named "types-separator.json" on the root where the command should run, and it will be picked up. Please follow this format:

  {
    "source": "../path/to/your/source/files",
    "output": "../path/for/output/",
    "formatCode": true
  }
  • formatCode currently is a flag to run prettier on the resulting code;
  • Tests have not been implemented yet;

typescript-types-separator's People

Contributors

aloisioaw avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.