A dev tool that converts JSON Schemas into type definitions for multiple languages including TypeScript, Go, Rust, and Python. Version 0.0.0-development is in early development with limited updates. It features automatic cycle detection, reference resolution, and deterministic title generation. Key differentiators: minimal dependencies, synchronous execution, and browser support via the web demo. The package generates one type alias per schema and includes documentation annotations.
npm install eth-json-schema-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: import default, instantiate with schema, call toTypescript method.
Review generated types and adjust downstream code if needed.
Use toTypescript() instead of to('typescript').Ensure your bundler (e.g., webpack) includes Node.js polyfills for path and url modules.
Use exact lowercase names when calling .to(), or use the dedicated methods.
Use import JsonSchemaTranspiler from 'eth-json-schema-transpiler' (ESM) or const JsonSchemaTranspiler = require('eth-json-schema-transpiler').default (CJS)Parse the JSON string first: JSON.parse(schemaString)
Update to latest version. If using CommonJS, ensure you used .default.
Use one of: 'typescript', 'go', 'rust', 'python'