2
0
Files
bot/packages/schemas/features/blocks/forged/helpers.ts
2024-03-19 08:31:36 +01:00

10 lines
382 B
TypeScript

import { forgedBlocks } from '@typebot.io/forge-repository/definitions'
import { ForgedBlock } from '@typebot.io/forge-repository/types'
import { Block } from '../schema'
export const isForgedBlock = (block: Block): block is ForgedBlock =>
block.type in forgedBlocks
export const isForgedBlockType = (
type: Block['type']
): type is ForgedBlock['type'] => type in forgedBlocks