TypeScript
txiki.js provides TypeScript type definitions via the @txikijs/types npm package.
Installation
npm install @txikijs/types --save-dev
This package includes type definitions for all txiki.js APIs, enabling autocompletion and type checking in your editor.
Transpiling
txiki.js doesn't run TypeScript directly, .ts files need to be transpiled to JavaScript first. The recommended approach is to use esbuild, which handles both TypeScript type stripping and bundling in a single fast step.
See the Code Bundling guide for the full setup.