mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(editor): should not rely on doc collection type (#9501)
This commit is contained in:
6
packages/common/env/src/constant.ts
vendored
6
packages/common/env/src/constant.ts
vendored
@@ -1,7 +1,7 @@
|
||||
// This file should has not side effect
|
||||
// oxlint-disable-next-line
|
||||
// @ts-ignore FIXME: typecheck error
|
||||
import type { DocCollection } from '@blocksuite/affine/store';
|
||||
import type { Workspace } from '@blocksuite/affine/store';
|
||||
|
||||
declare global {
|
||||
// oxlint-disable-next-line no-var
|
||||
@@ -91,10 +91,10 @@ export const Messages = {
|
||||
};
|
||||
|
||||
export class PageNotFoundError extends TypeError {
|
||||
readonly docCollection: DocCollection;
|
||||
readonly docCollection: Workspace;
|
||||
readonly pageId: string;
|
||||
|
||||
constructor(docCollection: DocCollection, pageId: string) {
|
||||
constructor(docCollection: Workspace, pageId: string) {
|
||||
super();
|
||||
this.docCollection = docCollection;
|
||||
this.pageId = pageId;
|
||||
|
||||
5
packages/common/env/src/filter.ts
vendored
5
packages/common/env/src/filter.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import type { DocCollection } from '@blocksuite/affine/store';
|
||||
import type { DocsPropertiesMeta } from '@blocksuite/affine/store';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const literalValueSchema: z.ZodType<LiteralValue, z.ZodTypeDef> =
|
||||
@@ -29,7 +29,6 @@ export type Ref = {
|
||||
name: keyof VariableMap;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface VariableMap {}
|
||||
|
||||
export const literalSchema = z.object({
|
||||
@@ -85,4 +84,4 @@ export const tagSchema = z.object({
|
||||
});
|
||||
export type Tag = z.input<typeof tagSchema>;
|
||||
|
||||
export type PropertiesMeta = DocCollection['meta']['properties'];
|
||||
export type PropertiesMeta = DocsPropertiesMeta;
|
||||
|
||||
Reference in New Issue
Block a user