BlockSuite API Documentation / @blocksuite/store / BlockSchema
Variable: BlockSchema
const
BlockSchema:ZodObject
<{model
:ZodObject
<{children
:ZodOptional
<ZodArray
<ZodString
,"many"
>>;flavour
:ZodString
;parent
:ZodOptional
<ZodArray
<ZodString
,"many"
>>;props
:ZodOptional
<ZodFunction
<ZodTuple
<[ZodType
<InternalPrimitives
,ZodTypeDef
,InternalPrimitives
>],ZodUnknown
>,ZodRecord
<ZodString
,ZodAny
>>>;role
:ZodEnum
<["root"
,"hub"
,"content"
]>;toModel
:ZodOptional
<ZodFunction
<ZodTuple
<[],ZodUnknown
>,ZodType
<BlockModel
<object
,SignaledProps
<object
>>,ZodTypeDef
,BlockModel
<object
,SignaledProps
<object
>>>>>; },"strip"
,ZodTypeAny
, {children
:string
[];flavour
:string
;parent
:string
[];props
: (...args
) =>Record
<string
,any
>;role
:"root"
|"hub"
|"content"
;toModel
: (...args
) =>BlockModel
<object
,SignaledProps
<object
>>; }, {children
:string
[];flavour
:string
;parent
:string
[];props
: (...args
) =>Record
<string
,any
>;role
:"root"
|"hub"
|"content"
;toModel
: (...args
) =>BlockModel
<object
,SignaledProps
<object
>>; }>;transformer
:ZodOptional
<ZodFunction
<ZodTuple
<[],ZodUnknown
>,ZodType
<BaseBlockTransformer
<object
>,ZodTypeDef
,BaseBlockTransformer
<object
>>>>;version
:ZodNumber
; },"strip"
,ZodTypeAny
, {model
: {children
:string
[];flavour
:string
;parent
:string
[];props
: (...args
) =>Record
<string
,any
>;role
:"root"
|"hub"
|"content"
;toModel
: (...args
) =>BlockModel
<object
,SignaledProps
<object
>>; };transformer
: (...args
) =>BaseBlockTransformer
<object
>;version
:number
; }, {model
: {children
:string
[];flavour
:string
;parent
:string
[];props
: (...args
) =>Record
<string
,any
>;role
:"root"
|"hub"
|"content"
;toModel
: (...args
) =>BlockModel
<object
,SignaledProps
<object
>>; };transformer
: (...args
) =>BaseBlockTransformer
<object
>;version
:number
; }>
Defined in
packages/framework/store/src/schema/base.ts:33