From 0d8630fc843cce54a4199141cf88e705086a24ba Mon Sep 17 00:00:00 2001 From: Tony133 Date: Sun, 26 Apr 2026 17:05:33 +0200 Subject: [PATCH 1/2] refactor(types): migrate from tsd to tstyche --- package.json | 6 +++--- types/{index.test-d.ts => index.tst.ts} | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) rename types/{index.test-d.ts => index.tst.ts} (73%) diff --git a/package.json b/package.json index 254111e..48cd6c7 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint": "eslint", "lint:fix": "eslint --fix", "test": "npm run test:unit && npm run test:typescript", - "test:typescript": "tsd", + "test:typescript": "tstyche", "test:unit": "c8 -100 node --test" }, "repository": { @@ -78,9 +78,9 @@ "shortid": "^2.2.16", "superheroes": "^4.0.0", "svelte": "^3.44.0", - "tsd": "^0.33.0" + "tstyche": "^7.0.0" }, "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/types/index.test-d.ts b/types/index.tst.ts similarity index 73% rename from types/index.test-d.ts rename to types/index.tst.ts index a449398..3f6ed7e 100644 --- a/types/index.test-d.ts +++ b/types/index.tst.ts @@ -1,7 +1,7 @@ import fastify, { FastifyInstance } from 'fastify' import hotwire from '..' import { join } from 'node:path' -import { expectType } from 'tsd' +import { expect } from 'tstyche' const app: FastifyInstance = fastify() app.register(hotwire, { @@ -10,10 +10,14 @@ app.register(hotwire, { }) app.get('/stream', async (_req, reply) => { + expect( + reply.turboStream.append('file', 'target', { hello: 'world' }) + ).type.toBeAssignableTo() + return reply.turboStream.append('file', 'target', { hello: 'world' }) }) app.get('/generate', async (_req, reply) => { const fragment = await reply.turboGenerate.append('file', 'target', { hello: 'world' }) - expectType(fragment) + expect(fragment).type.toBe() }) From 53975fb529014087ce4779d70bb456a759cd4dcd Mon Sep 17 00:00:00 2001 From: Antonio Tripodi Date: Mon, 27 Apr 2026 10:54:40 +0200 Subject: [PATCH 2/2] chore: update index.tst.ts Co-authored-by: Tom Mrazauskas Signed-off-by: Antonio Tripodi --- types/index.tst.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.tst.ts b/types/index.tst.ts index 3f6ed7e..24ca7de 100644 --- a/types/index.tst.ts +++ b/types/index.tst.ts @@ -12,7 +12,7 @@ app.register(hotwire, { app.get('/stream', async (_req, reply) => { expect( reply.turboStream.append('file', 'target', { hello: 'world' }) - ).type.toBeAssignableTo() + ).type.toBe(reply) return reply.turboStream.append('file', 'target', { hello: 'world' }) })