--transforms flag (run --transforms=var_to_const_let,implicit_any) or the transforms array in .refactronrc.json. The default is ['all'].
Catalog
| Transform ID | Language | What it does |
|---|---|---|
callback_to_async_await | Python | Trailing-callback function → async def returning the result |
format_to_fstring | Python | %-format and .format() calls → f-strings |
manual_typecheck_to_hints | Python | isinstance chain dispatching one parameter → Union[...] annotation |
deprecated_api_requests_to_httpx | Python | requests imports / calls → httpx |
class_to_dataclass | Python | Pure __init__-assignment classes → @dataclass |
super_no_args | Python | super(Class, self).method() → super().method() |
lru_cache_to_cache | Python | @lru_cache(maxsize=None) → @functools.cache (≥ 3.9) |
pep585_generics | Python | typing.List/Dict/Tuple/... → built-in list/dict/tuple (≥ 3.9) |
pep604_optional_union | Python | Optional[X] → X | None; Union[A, B] → A | B (≥ 3.10) |
datetime_utc_alias | Python | datetime.timezone.utc → datetime.UTC (≥ 3.11) |
yield_from_for_loop | Python | for x in y: yield x → yield from y |
var_to_const_let | TypeScript | var → const (or let if reassigned) per binding |
promise_chains_to_async | TypeScript | .then(...).then(...) chains → async/await |
implicit_any | TypeScript | Add explicit parameter types when all call sites pass the same primitive |
commonjs_to_esm | TypeScript | require / module.exports → ES module import / export |
promise_constructor_to_async | TypeScript | new Promise((resolve) => resolve(x)) → async returning x |
indexof_to_includes | TypeScript | arr.indexOf(x) !== -1 → arr.includes(x) (ES2016+) |
object_assign_to_spread | TypeScript | Object.assign({}, a, b) → { ...a, ...b } (ES2018+) |
string_concat_to_template_literal | TypeScript | "a " + name + "!" → `a ${name}!` (ES2015+) |
vue_set_delete_to_assignment | TypeScript | Vue.set / this.$set → direct assignment; Vue.delete → delete |
Browse the catalog
callback_to_async_await
Python · trailing-callback →
async defformat_to_fstring
Python ·
% and .format() → f-stringmanual_typecheck_to_hints
Python ·
isinstance chain → Union[...]deprecated_api_requests_to_httpx
Python ·
requests → httpxclass_to_dataclass
Python · plain class →
@dataclasssuper_no_args
Python ·
super(C, self) → super()lru_cache_to_cache
Python ·
@lru_cache(maxsize=None) → @cache (≥ 3.9)pep585_generics
Python ·
typing.List/Dict → list/dict (PEP 585)pep604_optional_union
Python ·
Optional[X] → X | None (PEP 604)datetime_utc_alias
Python ·
datetime.timezone.utc → datetime.UTC (≥ 3.11)yield_from_for_loop
Python ·
for x in y: yield x → yield from yvar_to_const_let
TypeScript ·
var → const / letpromise_chains_to_async
TypeScript ·
.then().then() → async/awaitimplicit_any
TypeScript · annotate inferred-primitive parameters
commonjs_to_esm
TypeScript ·
require / module.exports → ESMpromise_constructor_to_async
TypeScript ·
new Promise(...) → asyncindexof_to_includes
TypeScript ·
indexOf(x) !== -1 → includes(x) (ES2016+)object_assign_to_spread
TypeScript ·
Object.assign({}, …) → spread literal (ES2018+)string_concat_to_template_literal
TypeScript ·
"…" + x → template literal (ES2015+)vue_set_delete_to_assignment
TypeScript ·
Vue.set / this.$set → direct assignmentEvery transform’s “after” output passes Gate 1 (syntax) by construction — the refactorer rebuilds the source from a parsed CST/AST. Gates 2 and 3 (imports + tests) are what catch regressions the local rewrite couldn’t predict.