Translation
Typed Python, written as TypeScript. And back.
This page records existing translation examples. The coverage guide records supported translation contracts and checks. A translation can change syntax and formatting; review the whole output and check behavior under the stated language rules.
Translate a supported helper, then inspect what the target needs you to finish.
For example, a Python list of text, list[str], can become a TypeScript string[].
The shared code record, called IR, describes supported arguments, statements and expressions.
Eight readers and eight writers cover Rust, Go, Java, Python, TypeScript, Zig, Bash and Lean.
Their 56 ordered pairs share that record. Runtime behavior still needs independent checks.
Generated Every result below records what
fr translate produced, captured by
cargo test --test site_data.
Inspect each generated result and its unsupported constructs.
The first two examples preserve their supported syntax without carrying unsupported text into comments.
That still needs behavior checks. For a route migration, compare the
declared HTTP contract and test the actual responses too.
What the tool promises
Inspect arguments, result types and unsupported behavior. A signature names the function's arguments and result type. Matching that shape does not establish equal integer arithmetic, errors or library behavior. Review the report, compile the output and test the inputs that matter to your application.
Names take the target's convention, and only the file's own.
user_create is userCreate in TypeScript, at its
declaration and at every use. The tool leaves a name the module does not declare,
such as db.users.find or any library function, as written, because
re-casing it would rename somebody else's API.
Nothing goes missing quietly. Ownership, decorators, generators, destructuring and error propagation have no general translation, and a guess would be worse than a gap. The tool carries each into the output verbatim, inside a comment, under a marker, and counts it in the report. You finish the file it hands back, instead of diffing it against the original to learn what went missing.
Where it stops
It is not a compiler, and the result is a draft. The FastAPI backend at the bottom shows the limit. Five of its five signatures mention types from libraries this tool has never heard of, and Python's keyword-only parameters have no TypeScript spelling at all. So the types cross, and the report says that callers will write the call differently. That sentence is worth more than a silently plausible file.