Syntax & Compatibility

Tfkity is designed for flexibility. Since our compiler builds the source code, there are no runtime restrictions. Write in our native TFY syntax, standard JavaScript, or mix both.

AST_NORMALIZATION_MATRIX
JS
STANDARD
TFY
NATIVE

Choose Your Style

native.tfy Optimized for terseness
func calculate(x) {
    if x > 10 { // No parentheses needed
        var result = x * 2 // Dynamic typing
        log("Result: " + result)
        return result
    }
}
standard.js 100% Valid JavaScript
function calculate(x) {
    if (x > 10) {
        let result = x * 2;
        console.log("Result: " + result);
        return result;
    }
}

Hybrid Mode

Since Tfkity compiles everything, you can mix both styles in the same file. Use standard JS libraries alongside concise TFY syntax logic.

func hybridApp() {
    const data = [1, 2, 3]; // Standard JS Array

    // Use TFY logic flows
    data.forEach(item => {
        if item > 1 {
            log("Processing: " + item)
        }
    })
}

Why a new syntax?

It's not just a wrapper. Unlike Node.js or Bun which run JavaScript at runtime, Tfkity is a compiler.

You are writing code that looks like JavaScript, but at build time, our compiler transforms it into: other languages, and platforms especifics.

The TFY syntax was the original intent for this architecture, designed to be cleaner and safer. However, we support standard JS syntax to make adoption zero-friction for web developers.

BUILD TIME TRANSFORMATION
Source Code → AST → Native IR → Binary

Universal Imports

Don't wait for bindings. Tfkity auto-detects imports at build time, downloads the package, and embeds it into your project's optimized bundle.

TFY Style Import

con random from npm us random

Standard Import

import random from "random";

Build-Time Intelligence

When you build, we generate a .tfkity.bundle file. We scan your imports and the original package (mainOG.tfkity.bundle), removing any unused code (tree-shaking) before it ever reaches the runtime. This ensures your app stays small even if you import massive libraries.

2025 Tfkity Co.