fix(examples): drop mastra's typecheck:channel — it can never pass

channel-host.mts imports src/agent.ts, which transitively pulls in
src/mastra/** — and that tree has a pre-existing "Type 'Memory' is not
assignable to type 'MastraMemory'" error unrelated to the Channel host.
TypeScript follows imports regardless of tsconfig `include`, so no
scoping fix exists; a typecheck script that can never pass just trains
people to ignore it.

Removes typecheck:channel from mastra/package.json only — the channel
script and tsconfig.channel.json (still used for module resolution) are
unchanged — and leaves a comment in tsconfig.channel.json explaining why
this starter alone has no such script. Every other starter keeps
typecheck:channel.
This commit is contained in:
Benjamin Taylor
2026-08-02 01:17:37 -05:00
parent 93ea8de483
commit 166dc94691
2 changed files with 10 additions and 2 deletions
+1 -2
View File
@@ -9,8 +9,7 @@
"dev:debug": "LOG_LEVEL=debug npm run dev",
"build": "next build",
"start": "next start",
"channel": "tsx --tsconfig tsconfig.channel.json channel-host.mts",
"typecheck:channel": "tsc -p tsconfig.channel.json --noEmit"
"channel": "tsx --tsconfig tsconfig.channel.json channel-host.mts"
},
"dependencies": {
"@ag-ui/client": "0.0.57",
@@ -1,4 +1,13 @@
{
// Unlike every other starter, this config has no matching `typecheck:channel`
// script in package.json. `channel-host.mts` imports `src/agent.ts`, which
// transitively pulls in `src/mastra/**` — and that tree has a pre-existing
// `Type 'Memory' is not assignable to type 'MastraMemory'` error
// (src/mastra/agents/index.ts:18) unrelated to the Channel host. TypeScript
// follows imports regardless of `include`, so `tsc -p tsconfig.channel.json
// --noEmit` can never pass here and there is no scoping fix. This config is
// still used by the `channel` script (via `tsx --tsconfig`), which only
// needs it for module resolution, not a clean typecheck.
"compilerOptions": {
"target": "es2022",
"module": "esnext",