fix(editor): add missing zod schema for edgeless frame (#10024)

Related to https://github.com/toeverything/AFFiNE/pull/9970#discussion_r1944971309

### What changes:
- Add missing zod shcema for edgeless basic props
- Change `applyLastProps` to generic function for better return type inference of
- Fix: add `ZodIntersection` case to `makeDeepOptional`
This commit is contained in:
L-Sun
2025-02-07 12:49:59 +00:00
parent 36ed81bcc6
commit 459972fe6c
7 changed files with 80 additions and 28 deletions
@@ -139,7 +139,10 @@ export class EditPropsStore extends LifeCycleWatcher {
}
}
applyLastProps(key: LastPropsKey, props: Record<string, unknown>) {
applyLastProps<K extends LastPropsKey>(
key: K,
props: Record<string, unknown>
) {
if (['__proto__', 'constructor', 'prototype'].includes(key)) {
throw new BlockSuiteError(
ErrorCode.DefaultRuntimeError,