-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathts-errors.txt
More file actions
129 lines (103 loc) · 6.86 KB
/
ts-errors.txt
File metadata and controls
129 lines (103 loc) · 6.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
================================================================================
TypeScript Compilation Error Report
Generated from: npx tsc --noEmit
Project: cortex-desktop (Cortex IDE)
================================================================================
--- Command: npx tsc --noEmit 2>&1 | head -500 ---
(empty — 0 lines of output)
--- Command: npx tsc --noEmit 2>&1 | tail -500 ---
(empty — 0 lines of output)
RESULT: PASS (0 errors, exit code 0)
The project compiles cleanly with the current tsconfig.json settings:
- strict: true
- noUnusedLocals: true
- noUnusedParameters: true
- noFallthroughCasesInSwitch: true
- skipLibCheck: true
No TypeScript compilation errors were found.
--- Command: cd mcp-server && npx tsc --noEmit ---
(empty — 0 lines of output, exit code 0)
The mcp-server sub-project also compiles cleanly.
================================================================================
Additional Checks
================================================================================
--- Check: npx tsc --noEmit --skipLibCheck false ---
Result: 10 errors (5 in node_modules, 5 in src/vite-env.d.ts)
node_modules/vite/types/importMeta.d.ts(15,3): error TS2687: All declarations of 'BASE_URL' must have identical modifiers.
node_modules/vite/types/importMeta.d.ts(16,3): error TS2687: All declarations of 'MODE' must have identical modifiers.
node_modules/vite/types/importMeta.d.ts(17,3): error TS2687: All declarations of 'DEV' must have identical modifiers.
node_modules/vite/types/importMeta.d.ts(18,3): error TS2687: All declarations of 'PROD' must have identical modifiers.
node_modules/vite/types/importMeta.d.ts(19,3): error TS2687: All declarations of 'SSR' must have identical modifiers.
src/vite-env.d.ts(4,12): error TS2687: All declarations of 'DEV' must have identical modifiers.
src/vite-env.d.ts(5,12): error TS2687: All declarations of 'PROD' must have identical modifiers.
src/vite-env.d.ts(6,12): error TS2687: All declarations of 'MODE' must have identical modifiers.
src/vite-env.d.ts(7,12): error TS2687: All declarations of 'BASE_URL' must have identical modifiers.
src/vite-env.d.ts(8,12): error TS2687: All declarations of 'SSR' must have identical modifiers.
Root cause: src/vite-env.d.ts re-declares ImportMetaEnv properties without the
'readonly' modifier, conflicting with vite/client's declarations. The file
already includes `/// <reference types="vite/client" />`, making the manual
re-declarations redundant and conflicting.
--- Check: npx tsc --noEmit --noUncheckedIndexedAccess ---
Result: ~3,981 errors
This flag is NOT currently enabled in tsconfig.json. If enabled, it would add
`| undefined` to all indexed access types (array[i], record[key]), requiring
explicit null checks throughout the codebase. Sample errors include:
- "Object is possibly 'undefined'" (TS2532)
- "Type 'X | undefined' is not assignable to type 'X'" (TS2322)
- "'item' is possibly 'undefined'" (TS18048)
--- Check: mcp-server/npx tsc --noEmit (with node_modules installed) ---
Result: PASS (0 errors)
The mcp-server sub-project compiles cleanly with its own tsconfig.json when
dependencies are installed.
--- Check: mcp-server/npx tsc --noEmit (WITHOUT node_modules) ---
Result: FAIL (22 errors)
When mcp-server/node_modules is missing, 22 errors surface. These are latent
issues that cascade from 4 missing module declarations:
src/client.ts(104,25): error TS2345: Argument of type 'string | NonSharedBuffer' is not assignable to parameter of type 'Buffer<ArrayBufferLike>'.
Type 'string' is not assignable to type 'Buffer<ArrayBufferLike>'.
src/index.ts(13,45): error TS2307: Cannot find module '@modelcontextprotocol/sdk/server/mcp.js' or its corresponding type declarations.
src/index.ts(14,38): error TS2307: Cannot find module '@modelcontextprotocol/sdk/server/stdio.js' or its corresponding type declarations.
src/index.ts(15,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
src/index.ts(20,22): error TS2307: Cannot find module 'glob' or its corresponding type declarations.
src/index.ts(115,12): error TS7006: Parameter 'uri' implicitly has an 'any' type.
src/index.ts(115,17): error TS7006: Parameter 'params' implicitly has an 'any' type.
src/index.ts(154,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(193,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(220,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(251,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(282,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(312,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(344,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(373,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(401,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(455,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(486,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(512,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(551,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(608,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
src/index.ts(665,12): error TS7006: Parameter 'args' implicitly has an 'any' type.
Breakdown: 4 missing imports (TS2307), 1 type mismatch (TS2345), 17 implicit any (TS7006).
The TS7006 errors cascade from the TS2307 errors — the MCP SDK provides type
inference for callback parameters.
--- Check: mcp-server/npx tsc --noEmit --noUnusedLocals --noUnusedParameters ---
Result: FAIL (2 additional errors)
src/index.ts(72,7): error TS6133: 'truncationSchema' is declared but its value is never read.
src/index.ts(665,12): error TS6133: 'args' is declared but its value is never read.
Note: mcp-server/tsconfig.json does NOT enable noUnusedLocals or
noUnusedParameters (unlike the main tsconfig.json which does). These 2 errors
would surface if those flags were enabled for consistency.
================================================================================
Type Safety Concerns (not compilation errors, but code quality issues)
================================================================================
Total `: any` annotations: 935 occurrences across src/
Total `as any` type casts: 528 occurrences across src/
Total `@ts-ignore` comments: 7 occurrences (all in src/components/editor/VimMode.tsx)
Total `@ts-expect-error`: 22 occurrences (3 in editor/, 19 in settings/)
In non-test source files only:
`: any` annotations: 75 occurrences
`as any` type casts: 50 occurrences
`@ts-ignore`: 7 occurrences
`@ts-expect-error`: 22 occurrences
In test files only:
`: any` annotations: 860 occurrences
`as any` type casts: 478 occurrences