mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
> Opened by @abhiaiyer91
## Summary
Running `tsc -p server-adapters/<adapter>/tsconfig.json` fails on `main`
for several adapters. Review gates that typecheck adapter packages fail
because of it.
**express, fastify, elysia:** each `examples/index.ts` destructures
`getInitData()` without a type argument. That call returns `unknown`, so
TS2339 fires. The fix passes a type argument, the same way
`server-adapters/hono/examples/index.ts` already does:
- `getInitData<typeof weatherWorkflow>()` for `city`
- `getInitData<{ vacationDescription: string }>()` for the travel
planner step. An inline type avoids a self-referential `typeof
travelAgentWorkflow`.
koa had the same error, but main fixed it in #28207. This PR takes
main's version and no longer changes koa.
**nestjs:** `tsdown.config.ts` set an `esbuildOptions` hook to force the
decorator compiler flags. The installed tsdown (0.23.1) builds with
rolldown and has no `esbuildOptions` option, so the hook never ran
during the build, and tsc rejects it (TS2769, TS7006). The decorator
flags already reach the build another way: `tsconfig.json` sets
`experimentalDecorators` and `emitDecoratorMetadata`, and tsdown passes
the tsconfig to rolldown. The fix deletes the dead hook and adds
`tsconfig: 'tsconfig.json'` so the source of those flags is explicit.
No `src/` or tsconfig changes, no ts-ignore, `any` or casts.
**No changeset, on purpose.** This PR only changes `examples/` and build
config, and no published output changes. Per the maintainer, it doesn't
get a changeset. The changeset gate check is expected to flag it.
## Proof
**tsc:** `npx tsc -p tsconfig.json --noEmit` from each adapter directory
(error counts). The After column is on head
|
History
|
|
|---|---|---|
| .. | ||
| index.ts | ||