mirror of
https://github.com/Mintplex-Labs/nut.js.git
synced 2026-07-25 20:45:27 -04:00
nut.js TypeScript sample
nut.js is written in TypeScript and thus fully supports TypeScript
Setup
Install TypeScript in your project.
npm i typescript ts-node
Afterwards, initialize a new TypeScript project:
npx tsc --init
Write your test
Let's create a simple demo test:
import { Region, screen } from "@mintplex-labs/nut-js";
(async () => {
await screen.highlight(new Region(100, 200, 300, 400));
})();
Run
npx ts-node index.ts