typhon-typescript

raw JSON →
1.0.7 verified Fri May 01 auth: no javascript

A transpiler that converts Typhon to TypeScript. Version 1.0.7 stable. Low-cadence maintenance with no recent updates. Differentiator: domain-specific transpilation for the Typhon language, targeting TypeScript output. Minimal documentation; primarily a build tool dependency.

error Cannot find module 'typhon-typescript'
cause Package not installed or not in node_modules.
fix
Run npm install typhon-typescript --save-dev
error ERR_REQUIRE_ESM
cause Using require() on an ES module.
fix
Change to import statement.
error TyphonSyntaxError: unexpected token
cause Invalid Typhon code input.
fix
Verify Typhon syntax according to language spec.
gotcha Package is ESM-only. CommonJS require() will throw ERR_REQUIRE_ESM.
fix Use import instead of require, or set type:"module" in package.json.
breaking No breaking changes documented as package is low-activity; may have undocumented breaking changes between minor versions.
fix Pin exact version and test upgrades.
deprecated No deprecation notices; but package has not been updated recently and may be considered low-support.
fix Consider forking or contributing if active maintenance needed.
gotcha TypeScript types are shipped but may be incomplete; rely on runtime behavior.
fix Test compilation output with expected Typhon features.
npm install typhon-typescript
yarn add typhon-typescript
pnpm add typhon-typescript

Transpile a simple Typhon program that prints to console, outputting equivalent TypeScript.

import { compile } from 'typhon-typescript';

const tyCode = `
output "Hello, world";
`;

const tsCode = compile(tyCode);
console.log(tsCode);