codev / src /types /connectorText.ts
chenbhao's picture
init: verspercode v0.1.0
064bfd6
Raw
History Blame Contribute Delete
541 Bytes
export type ConnectorTextBlock = {
type: 'connector_text'
connector_text: string
}
export type ConnectorTextDelta = {
type: 'connector_text_delta'
connector_text: string
}
export function isConnectorTextBlock(
value: unknown,
): value is ConnectorTextBlock {
return (
typeof value === 'object' &&
value !== null &&
'type' in value &&
'connector_text' in value &&
(value as { type?: unknown }).type === 'connector_text' &&
typeof (value as { connector_text?: unknown }).connector_text === 'string'
)
}