(value: unknown)
| 26 | |
| 27 | /** Check if a value is a valid tab type (base tab or terminal instance). */ |
| 28 | export function isTabType(value: unknown): value is TabType { |
| 29 | if (typeof value !== "string") return false; |
| 30 | if (isBaseTabId(value)) return true; |
| 31 | return value === "terminal" || value.startsWith("terminal:"); |
| 32 | } |
| 33 | |
| 34 | /** Check if a tab type represents a terminal (either base "terminal" or "terminal:<sessionId>"). */ |
| 35 | export function isTerminalTab(tab: TabType): boolean { |
no test coverage detected