MCPcopy
hub / github.com/deepnote/deepnote / createBlockTypeValidator

Function createBlockTypeValidator

packages/cli/src/commands/cat.ts:27–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 * @returns Validator function for Commander option parsing
26 */
27export function createBlockTypeValidator(): (value: string) => FilterableBlockType {
28 return (value: string): FilterableBlockType => {
29 if (!FILTERABLE_BLOCK_TYPES.includes(value as FilterableBlockType)) {
30 throw new InvalidArgumentError(`Invalid block type "${value}". Valid types: ${FILTERABLE_BLOCK_TYPES.join(', ')}`)
31 }
32 return value as FilterableBlockType
33 }
34}
35
36export interface CatOptions {
37 output?: OutputFormat

Callers 1

registerCommandsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected