@portabletext/editor
Version:
Portable Text Editor made in React
14 lines (10 loc) • 411 B
text/typescript
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