{"id":42057,"library":"t3-lang","title":"T3 Language","description":"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.","status":"active","version":"0.0.17","language":"javascript","source_language":"en","source_url":"https://github.com/falsy/t3","tags":["javascript","t3","typescript","typescript-superset","transpiler","pegjs","peggy","dsl","minimal-syntax"],"install":[{"cmd":"npm install t3-lang","lang":"bash","label":"npm"},{"cmd":"yarn add t3-lang","lang":"bash","label":"yarn"},{"cmd":"pnpm add t3-lang","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Parser generator for the custom grammar.","package":"peggy","optional":false}],"imports":[{"note":"The CLI is invoked via 't3-lang' or 't3' if installed globally. 't3' is the short alias.","wrong":"npx t3 path/to/file.t3","symbol":"t3 (CLI)","correct":"npx t3-lang path/to/file.t3"},{"note":"Package is ESM-only; CommonJS require may not work. API may not be fully public.","wrong":"const transpile = require('t3-lang');","symbol":"Transpile programmatically (if exposed)","correct":"import { transpile } from 't3-lang'"},{"note":"Parser is in a subpath export.","wrong":"import { parse } from 't3-lang'","symbol":"Parser (grammar)","correct":"import { parse } from 't3-lang/parser'"}],"quickstart":{"code":"// Install globally or use npx\nnpm install -g t3-lang\n\n# Create a .t3 file\necho 'let x = 10\nif x > 0\n  console.log \"positive\"' > example.t3\n\n# Transpile to TypeScript\nnpx t3-lang example.t3 --outDir ./out\n\n# Output: ./out/example.ts\ncat ./out/example.ts","lang":"typescript","description":"Shows basic installation, creating a .t3 file, and transpiling it to .ts using the CLI."},"warnings":[{"fix":"Pin to exact version when used in production.","message":"Package is experimental; syntax and API may change without notice.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use 'npx t3-lang' instead of 't3' to avoid command not found.","message":"CLI 't3' command only works if package installed globally.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Follow T3 syntax: no semicolons, parentheses optional for control flow.","message":"No semicolons are required; using them may cause unexpected parsing.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use '--outDir' or rely on default (same directory).","message":"The '--outDir' flag may change in future versions; currently required for directory output.","severity":"deprecated","affected_versions":"~0.0.17"},{"fix":"Split files or avoid deeply nested syntax.","message":"Transpilation may fail on large files due to PEG.js parser limitations.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'aim':51 'around':28 'boilerpl':54 'cadenc':69 'cleaner':14 'cli':40 'clutter':35 'consid':76 'control':29 'convert':44 'definit':67 'differenti':50 'dsl':87 'experiment':77 'file':46 'flow':30 'focus':59 'grammar':66 'includ':38 'irregular':71 'javascript':78 'key':49 'languag':2 'minim':6,89 'minimal-syntax':88 'packag':37 'parenthes':27 'peg.js':64 'peggi':86 'pegj':85 'preserv':18 'provid':12 'readabl':61 'reduc':53 'releas':68 'remov':24 'requir':25 'semicolon':26 'simpler':15 'statement':31 'superset':7,83 'syntact':34 'syntax':16,90 'system':22 't3':1,3,42,45,79 'transpil':41,84 'ts':48 'type':21 'typescript':9,19,57,80,82 'typescript-superset':81 'use':63 'v0.0.17':10 'version':73","created_at":"2026-06-04T18:55:24.749753+00:00","updated_at":"2026-06-04T18:55:24.749753+00:00","problems":[{"fix":"Run 'npm install peggy' in your project, or install t3-lang globally.","cause":"Missing dependency peggy when using package locally.","error":"Error: Cannot find module 'peggy'"},{"fix":"Install globally with 'npm install -g t3-lang' or use 'npx t3-lang'.","cause":"Package not installed globally or not in PATH.","error":"t3: command not found"},{"fix":"Ensure all blocks (if, for, etc.) have bodies and are properly closed.","cause":"Unclosed block or missing expression in .t3 file.","error":"SyntaxError: Expected \"...\" but end of input found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/falsy/t3#readme","github":"https://github.com/falsy/t3","docs":null,"changelog":null,"pypi":null,"npm":"t3-lang","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}