Skip to content

BlockSuite API Documentation / @blocksuite/store / BlockSchema

Variable: BlockSchema ​

const BlockSchema: ZodObject<Object, "strip", ZodTypeAny, Object, Object>

Type declaration ​

model ​

model: ZodObject<Object, "strip", ZodTypeAny, Object, Object>

Type declaration ​

children ​

children: ZodOptional<ZodArray<ZodString, "many">> = ContentSchema

flavour ​

flavour: ZodString = FlavourSchema

parent ​

parent: ZodOptional<ZodArray<ZodString, "many">> = ParentSchema

props ​

props: ZodOptional<ZodFunction<ZodTuple<[ZodType<InternalPrimitives, ZodTypeDef, InternalPrimitives>], ZodUnknown>, ZodRecord<ZodString, ZodAny>>>

role ​

role: ZodEnum<["root", "hub", "content"]> = RoleSchema

toModel ​

toModel: ZodOptional<ZodFunction<ZodTuple<[], ZodUnknown>, ZodType<BaseBlockModel<object>, ZodTypeDef, BaseBlockModel<object>>>>

onUpgrade ​

onUpgrade: ZodOptional<ZodFunction<ZodTuple<[ZodAny, ZodNumber, ZodNumber], ZodUnknown>, ZodVoid>>

transformer ​

transformer: ZodOptional<ZodFunction<ZodTuple<[], ZodUnknown>, ZodType<BaseBlockTransformer<object>, ZodTypeDef, BaseBlockTransformer<object>>>>

version ​

version: ZodNumber

Source ​

packages/store/src/schema/base.ts:29


Generated using typedoc-plugin-markdown and TypeDoc