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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user