MCPcopy Index your code
hub / github.com/deepnote/deepnote / findBlockByType

Function findBlockByType

packages/cli/src/utils/block-label.test.ts:17–23  ·  view source on GitHub ↗
(blocks: DeepnoteBlock[], type: string)

Source from the content-addressed store, hash-verified

15}
16
17function findBlockByType(blocks: DeepnoteBlock[], type: string): DeepnoteBlock {
18 const block = blocks.find(b => b.type === type)
19 if (!block) {
20 throw new Error(`Block of type ${type} not found`)
21 }
22 return block
23}
24
25describe('getBlockLabel', () => {
26 describe('code blocks', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected