UNPKG

@portabletext/editor

Version:

Portable Text Editor made in React

14 lines (10 loc) 411 B
import type {PortableTextObject, PortableTextTextBlock} from '@sanity/types' export type TextBlockWithOptionalKey = Omit<PortableTextTextBlock, '_key'> & { _key?: PortableTextTextBlock['_key'] } export type ObjectBlockWithOptionalKey = Omit<PortableTextObject, '_key'> & { _key?: PortableTextObject['_key'] } export type BlockWithOptionalKey = | TextBlockWithOptionalKey | ObjectBlockWithOptionalKey