Skip to content

Language support

Yantrix aims to transpile to any turing-full language, the primary one being Typescript. Since implementation is independent, certain features may be shipped at varying times for different languages.

FeatureJSTSPureJS1PureTS1,2Python3Java
FSM from diagram
Context / reducers
Payloads
Expressions
Built-in functions
define/fn(args) => expr
User function injection4
Forks / predicates
Event subscription
Event emission
createEventBus() factory
@yantrix/core compatible5
Epoch tracking
Cycle counter
Named ID type aliases
TypeScript declarations
Pause / resume / disable
Zero external runtime deps
Side effects

NOTE

1 pure-javascript and pure-typescript produce self-contained output with zero npm runtime dependencies. No @yantrix/core or @yantrix/automata import in the generated file.

2 pure-typescript emits a .js file plus a .d.ts type declaration file as a pair.

3 Python requires pydash as a runtime peer dependency.

4 User function injection accepts .ts/.js files for JS/TS dialects and .py files for Python.

5 @yantrix/core compatible means the generated code exposes event adapters that can be plugged into @yantrix/core's CoreLoop orchestrator. Pure dialects and Python generate self-contained factories without event adapter infrastructure.

Type Mapping

LanguageLanguage TypeYantrix Type
JS/TSStringString
JS/TSNumberNumber
JS/TSArrayList
JS/TSObjectObject
PythonStringString
PythonInteger/Float*Number
PythonListList
PythonDictionaryObject
JavaStringString
JavaLongNumber
JavaListList
JavaMapObject

NOTE

* Values are typecasted depending on expression context