It is not required to transpile typescript into javascript anymore.
With style-dictionary it is possible to use javascript to generate style rules. such as I do.
I use typescript to proof that all my themes are consistent and for stability reasons.
source: ["build/*.*js"]
// src/dark.ts
import { light } from "../light/color.token.js";
// Let Typescript check that dark theme has the same values as light theme
type Dark = typeof light;
const dark: Dark = {...}
Unfortunately style dictionary cannot load my .ts files directly by using:
`source: ["src/*.*ts"]`
This would be much more convenient especially since all major runtimes do now support running typescript natively and i can run all my stuff without the intermediate step of transpiling everything.
When using typescript with
deno
bun
ornode
with the--experimental-strip-types
(https://github.com/nodejs/node/pull/53725)It is not required to transpile typescript into javascript anymore.
With
style-dictionary
it is possible to use javascript to generate style rules. such as I do.I use typescript to proof that all my themes are consistent and for stability reasons.
source: ["build/*.*js"]
Unfortunately style dictionary cannot load my
.ts
files directly by using:This would be much more convenient especially since all major runtimes do now support running typescript natively and i can run all my stuff without the intermediate step of transpiling everything.