Registry / gcp / firebase-bolt-transpiler

firebase-bolt-transpiler

JSON →
library0.1.0jsnpmunverified

Transpile Firebase Bolt type definitions to TypeScript interfaces. Current version 0.1.0, experimental. No active maintenance. Converts Bolt schemas like 'type Person { name: String }' to TypeScript interfaces. Limited by Bolt compiler's handling of arrays and inheritance. Alternatives: write TypeScript manually.

npm install firebase-bolt-transpiler
INSTALL
IMPORT
SIG · FIREBASE-BOLT-TRAN
F
firebase-bolt-transpiler
gcpjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

boltTranspiler
const boltTranspiler = require('boltTranspiler');
import boltTranspiler from 'boltTranspiler';
CommonJS only; no ESM module available.
typescript
boltTranspiler.typescript('type Person { name: String }')
boltTranspiler.TypeScript('type Person { name: String }')
Function name is lowercase 'typescript'.
swift
boltTranspiler.swift('type Person { name: String }')
boltTranspiler.Swift('type Person { name: String }')
Not yet implemented; returns undefined.

Demonstrates transpiling a simple Bolt type definition to TypeScript interface.

const boltTranspiler = require('boltTranspiler'); const boltCode = `type Person { name: String age: Number address: String? }`; const tsOutput = boltTranspiler.typescript(boltCode); console.log(tsOutput); // Output: // interface Person { // name: string; // age: number; // address?: string; // }
Debug
Known issues
breakingArray types (e.g. Object[]) are not translated to arrays; they become Map<String, Object> generics.
fix
Manually edit the generated TypeScript to use actual arrays.
affects: >=0.1.0
breakingExtendedObject extends Object {} does not produce 'extends Object' in output; Bolt compiler marks everything as derived from Object.
fix
Remove 'extends Object' from input Bolt code.
affects: >=0.1.0
gotchaPackage is abandoned; no releases or updates since 2016.
fix
Avoid using this package; use alternative tools or write TypeScript manually.
affects: >=0.1.0
gotchaSwift and Java transpilation methods are documented but not implemented.
fix
Do not rely on swift() or java() methods; they return undefined.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: boltTranspiler.typescript is not a function
Package not installed correctly or imported with wrong case.
fix
Ensure package is installed: npm install firebase-bolt-transpiler. Use: const boltTranspiler = require('boltTranspiler');
Cannot find module 'boltTranspiler'
Import path is wrong; package name is 'firebase-bolt-transpiler' not 'boltTranspiler'.
fix
Install correct package: npm install firebase-bolt-transpiler, then: const boltTranspiler = require('firebase-bolt-transpiler');
boltTranspiler.dart is not a function
No Dart support exists; only TypeScript, Swift, Java stubs.
fix
Use only typescript() method; ignore dart(), java(), swift() stubs.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
30
OpenAI (training)
1
Resources
firebase-bolt-transpiler — npm install firebase-bolt-transpiler · libregistry