Registry / serialization / onelang

onelang

JSON →
library0.0.7jsnpmunverified

OneLang is a source-to-source transpiler framework that enables writing code in multiple programming languages simultaneously. Currently at version 0.0.7, it is in early development with no stable release cadence. Unlike traditional transpilers, OneLang has its own type system and AST, and does not fully respect the syntax of input languages. It targets developers who want to generate code in multiple languages from a single source, but requires mastery of both target languages and OneLang itself. Key differentiators: self-defined rules, strong typing, and generic support, but limited maturity and documentation.

npm install onelang
INSTALL
IMPORT
SIG · ONELANG
O
onelang
serializationjavascriptv0.0.7
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.

OneLang
import { OneLang } from 'onelang'
const onelang = require('onelang')
Package is ESM-only; no CommonJS support.
Transpiler
import { Transpiler } from 'onelang'
Main class for transpilation tasks.
ASTNode
import type { ASTNode } from 'onelang'
import { ASTNode } from 'onelang'
ASTNode is a type-only export; use 'import type' for TypeScript.

Creates a OneLang instance, adds a TypeScript source file, and transpiles it to JavaScript.

import { OneLang } from 'onelang'; const oneLang = new OneLang(); oneLang.addSource('example.ts', ` function greet(name: string): string { return 'Hello, ' + name; } `); // Transpile to JavaScript const result = oneLang.transpile('example.ts', 'javascript'); console.log(result); // Expected output: 'function greet(name) { return "Hello, " + name; }'
onelang --version
Debug
Known issues
breakingMajor API changes expected as project is in alpha stage.
fix
Pin to specific version and test upgrades.
affects: 0.0.x
gotchaInput language syntax may not be fully respected; custom rules apply.
fix
Review OneLang documentation for syntax deviations.
affects: all
deprecatedNo stable release; API may change without notice.
fix
Use with caution for production.
affects: all
Errors
Common errors & fixes
TypeError: OneLang is not a constructor
Using CommonJS require instead of ESM import.
fix
Use 'import { OneLang } from 'onelang'' in an ESM context.
Module not found: Can't resolve 'onelang'
Package not installed or incorrect import path.
fix
Run 'npm install onelang' and ensure import path is correct.
Error: Unsupported language 'python'
Target language not supported by current version.
fix
Check supported languages in documentation.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
onelang — npm install onelang · libregistry