You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeScript error: stopPropagation does not exist on KeyEvent type (#7443) #7441
importtype{DomNode}from"./dist"// ← This pulls in dist/index.d.ts
And dist/index.d.ts has auto-generated loose types:
exportfunctionuseKeyboard(callback: any,options: any): void;// ← Types lost
When TypeScript resolves imports via the jsx-runtime (required for JSX components), it also loads dist/index.d.ts, which shadows the properly-typed exports with any types. But when using noImplicitAny or when the any type flows through, TypeScript can't infer that evt.stopPropagation() exists.
Impact
bun turbo typecheck fails
Pre-push hooks fail (blocking pushes without --no-verify)
Build still succeeds (Bun bundler doesn't type-check)
Reproduction
cd packages/opencode
bunx tsc --noEmit src/cli/cmd/tui/ui/dialog.tsx
Introduced In
Commit 1f9e195cd8ce6d9dcca4c966a7c9ba2f6222f29d ("stop esc propagation from dialogs")
import{useKeyboard,useRenderer,useTerminalDimensions}from"@opentui/solid"importtype{KeyEvent}from"@opentui/core"// Add explicit import// Then either annotate the callback:useKeyboard((evt: KeyEvent)=>{// ...})
changed the title [-]TypeScript error: stopPropagation does not exist on KeyEvent type[/-][+]TypeScript error: stopPropagation does not exist on KeyEvent type (#7443)[/+]on Jan 14, 2026
Activity
github-actions commentedon Jan 9, 2026
This issue might be a duplicate or closely related to existing keyboard event handling issues in dialogs. Please check:
Esckey 'through to the model #7384: TUI: Commands modal passesEsckey 'through to the model - related to keyboard event propagation in dialog componentsThe root cause in these issues also involves keyboard event handling in dialog components using the same
useKeyboardcallback pattern.[-]TypeScript error: stopPropagation does not exist on KeyEvent type[/-][+]TypeScript error: stopPropagation does not exist on KeyEvent type (#7443)[/+]CasualDeveloper commentedon Jan 18, 2026
Closing as obsolete: can’t reproduce on origin/dev anymore; bun turbo typecheck is clean; no action needed.