nut.js is written in TypeScript and thus fully supports TypeScript
Install TypeScript in your project.
npm i typescript ts-nodeAfterwards, initialize a new TypeScript project:
npx tsc --initLet's create a simple demo test:
import { Region, screen } from "@nut-tree/nut-js";
(async () => {
await screen.highlight(new Region(100, 200, 300, 400));
})();npx ts-node index.ts