Registry / devops / t3-lang

t3-lang

JSON →
library0.0.17jsnpmunverified

T3 is a minimal superset of TypeScript (v0.0.17) that provides a cleaner, simpler syntax while preserving TypeScript's type system. It removes required semicolons, parentheses around control flow statements, and other syntactic clutter. The package includes a CLI transpiler (t3) that converts .t3 files to .ts. Key differentiators: aims to reduce boilerplate more than TypeScript itself, focuses on readability, and uses PEG.js for grammar definition. Release cadence is irregular; this version should be considered experimental.

npm install t3-lang
INSTALL
IMPORT
SIG · T3-LANG
T
t3-lang
devopsjavascriptv0.0.17
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.

t3 (CLI)
npx t3-lang path/to/file.t3
npx t3 path/to/file.t3
The CLI is invoked via 't3-lang' or 't3' if installed globally. 't3' is the short alias.
Transpile programmatically (if exposed)
import { transpile } from 't3-lang'
const transpile = require('t3-lang');
Package is ESM-only; CommonJS require may not work. API may not be fully public.
Parser (grammar)
import { parse } from 't3-lang/parser'
import { parse } from 't3-lang'
Parser is in a subpath export.

Shows basic installation, creating a .t3 file, and transpiling it to .ts using the CLI.

// Install globally or use npx npm install -g t3-lang # Create a .t3 file echo 'let x = 10 if x > 0 console.log "positive"' > example.t3 # Transpile to TypeScript npx t3-lang example.t3 --outDir ./out # Output: ./out/example.ts cat ./out/example.ts
Debug
Known issues
breakingPackage is experimental; syntax and API may change without notice.
fix
Pin to exact version when used in production.
affects: >=0.0.1
gotchaCLI 't3' command only works if package installed globally.
fix
Use 'npx t3-lang' instead of 't3' to avoid command not found.
affects: >=0.0.1
gotchaNo semicolons are required; using them may cause unexpected parsing.
fix
Follow T3 syntax: no semicolons, parentheses optional for control flow.
affects: >=0.0.1
deprecatedThe '--outDir' flag may change in future versions; currently required for directory output.
fix
Use '--outDir' or rely on default (same directory).
affects: ~0.0.17
gotchaTranspilation may fail on large files due to PEG.js parser limitations.
fix
Split files or avoid deeply nested syntax.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'peggy'
Missing dependency peggy when using package locally.
fix
Run 'npm install peggy' in your project, or install t3-lang globally.
t3: command not found
Package not installed globally or not in PATH.
fix
Install globally with 'npm install -g t3-lang' or use 'npx t3-lang'.
SyntaxError: Expected "..." but end of input found.
Unclosed block or missing expression in .t3 file.
fix
Ensure all blocks (if, for, etc.) have bodies and are properly closed.
Upgrade
Version history
0.0.17latest on npm
Audit
Dependencies
peggyrequiredParser generator for the custom grammar.
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
t3-lang — npm install t3-lang · libregistry