MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / assertIsDebugConfig

Function assertIsDebugConfig

src/notebooks/debugger/helper.ts:52–64  ·  view source on GitHub ↗
(thing: unknown)

Source from the content-addressed store, hash-verified

50}
51
52export 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
66export function assertIsInteractiveWindowDebugConfig(thing: unknown): asserts thing is IInteractiveWindowDebugConfig {
67 assertIsDebugConfig(thing);

Callers 3

constructorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected