Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 495 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 495 Bytes

decoder-generator

Takes in a typescript file and generates a set of decoders based on the types contained therein.

Installlation

npm install -g decoders-generator

Usage

Basic usage

cat ./input-file.ts | decoders-generator > outfile.ts

Support for tagged unions

cat ./input-file.ts | decoders-generator --tag=kind > outfile.ts

Namespaced Import

cat ./input-file.ts | decoders-generator --namespacedImport > outfile.ts