Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

firebase-bolt-transpiler

fny4MIT0.1.0

Transpile Bolt type definitions to TypeScript

firebase, bolt, typescript

readme

Firebase Bolt Transpiler :zap:

Build Status npm version Dependencies

Transpile your Bolt files into TypeScript! Java and Swift coming soon.

Featuring GenericSupport<T> and NestedGenericSupport<NestedGenericSupport<GenericSupport<T>>>

Usage

const boltTranspiler = require('boltTranspiler');

boltTranspiler.typescript('type Person { name: String }')
// => 'interface Person { name: string; }'

Known Issues

  • type ExtendedObject extends Object {} doesn't return interface ExtendedObject extends Object {} since the Bolt compiler marks everything as derived from Object by default
    • Array types (e.g. Object[]) aren't tranlated to arrays in TypeScript since the Bolt compiler turns all arrays into Map<String, Object> generics

Wishlist

  • Better TypeScript formatting
  • Validate generated TypeScript with the TypeScript parser
  • Ability to prefix/suffix generated interface names
  • Commandline tools
  • Better samples
  • Extensions for Gulp users
  • Swift support
  • Java support