| 80 | type TsServerStateType = Record<string, TsServerDiagnosticType[]>; |
| 81 | |
| 82 | interface CellsContextType { |
| 83 | cells: ClientCellType[]; |
| 84 | setCells: (cells: ClientCellType[]) => void; |
| 85 | updateCell: (cell: ClientCellType) => void; |
| 86 | removeCell: (cell: ClientCellType) => void; |
| 87 | insertCellAt: (cell: ClientCellType, idx: number) => void; |
| 88 | createCodeCell: ( |
| 89 | idx: number, |
| 90 | language: CodeLanguageType, |
| 91 | attrs?: Partial<CodeCellType>, |
| 92 | ) => CodeCellType; |
| 93 | createMarkdownCell: (idx: number, attrs?: Partial<MarkdownCellType>) => MarkdownCellType; |
| 94 | createGenerateAiCell: (idx: number) => GenerateAICellType; |
| 95 | hasOutput: (id: string, type?: 'stdout' | 'stderr') => boolean; |
| 96 | getOutput: (id: string, type?: 'stdout' | 'stderr') => Array<OutputType>; |
| 97 | setOutput: (id: string, output: OutputType | OutputType[]) => void; |
| 98 | clearOutput: (id: string, type?: 'stdout' | 'stderr') => void; |
| 99 | getTsServerDiagnostics: (id: string) => TsServerDiagnosticType[]; |
| 100 | setTsServerDiagnostics: (id: string, diagnostics: TsServerDiagnosticType[]) => void; |
| 101 | getTsServerSuggestions: (id: string) => TsServerSuggestionType[]; |
| 102 | setTsServerSuggestions: (id: string, suggestions: TsServerSuggestionType[]) => void; |
| 103 | } |
| 104 | |
| 105 | const CellsContext = createContext<CellsContextType | undefined>(undefined); |
| 106 |
nothing calls this directly
no outgoing calls
no test coverage detected