(thing: unknown)
| 50 | } |
| 51 | |
| 52 | export function assertIsDebugConfig(thing: unknown): asserts thing is INotebookDebugConfig { |
| 53 | const config = thing as INotebookDebugConfig; |
| 54 | if ( |
| 55 | typeof config.__notebookUri === 'undefined' || |
| 56 | typeof config.__mode === 'undefined' || |
| 57 | ((config.__mode === KernelDebugMode.Cell || |
| 58 | config.__mode === KernelDebugMode.InteractiveWindow || |
| 59 | config.__mode === KernelDebugMode.RunByLine) && |
| 60 | typeof config.__cellIndex === 'undefined') |
| 61 | ) { |
| 62 | throw new Error('Invalid launch configuration'); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | export function assertIsInteractiveWindowDebugConfig(thing: unknown): asserts thing is IInteractiveWindowDebugConfig { |
| 67 | assertIsDebugConfig(thing); |
no outgoing calls
no test coverage detected