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

Function countBlocksWithOutputs

packages/convert/src/snapshot/merge.ts:101–112  ·  view source on GitHub ↗
(file: DeepnoteFile)

Source from the content-addressed store, hash-verified

99 * @returns Number of blocks that have outputs
100 */
101export function countBlocksWithOutputs(file: DeepnoteFile): number {
102 let count = 0
103 for (const notebook of file.project.notebooks) {
104 for (const block of notebook.blocks) {
105 const execBlock = block as DeepnoteBlock & { outputs?: unknown[] }
106 if (execBlock.outputs && execBlock.outputs.length > 0) {
107 count++
108 }
109 }
110 }
111 return count
112}

Callers 1

merge.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected