Skip to content

jiggum/js-type-writer

Repository files navigation

JS Type Writer

Heuristic type inference for JS

Install

$ yarn install

Usage

Examples

Command: yarn example/{target}

  • yarn example/seed
  • yarn example/mutate
  • yarn example/crossover
  • yarn example/fitness

Compile TS file to JS

yarn compile {input .ts file path}

$ yarn compile input/quicksort.ts

Generate type storage from JS/TS file

yarn dict {input .js/.ts file path} {output .json storage path}

$ yarn dict input/quicksort.js output/data.json

Replace types

yarn replace {input .json storage path} {input .js/.ts file path} {output .ts file path}

$ yarn replace output/data.json input/quicksort.js output/quicksort.ts

Check type

yarn diagnose {input .js/.ts file path} {input .json storage path}

$ yarn diagnose input/quicksort.js output/data.json

About

Heuristic type inference for JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •