refactor(editor): playground doc collection typing migration (#9593)

This commit is contained in:
doodlewind
2025-01-09 03:07:43 +00:00
parent 5ff2254c83
commit e269cce141
19 changed files with 48 additions and 84 deletions

View File

@@ -2,12 +2,12 @@ import { DEFAULT_ROUGHNESS } from '@blocksuite/affine-model';
import type { SerializedXYWH } from '@blocksuite/global/utils';
import {
Boxed,
type DocCollection,
nanoid,
native2Y,
Text,
type Y,
type Workspace,
} from '@blocksuite/store';
import type * as Y from 'yjs';
import type { InitFn } from './utils.js';
@@ -46,10 +46,7 @@ function createShapes(count: number): Record<string, unknown> {
const SHAPES_COUNT = 100;
const RANGE = 2000;
export const heavyWhiteboard: InitFn = (
collection: DocCollection,
id: string
) => {
export const heavyWhiteboard: InitFn = (collection: Workspace, id: string) => {
const count = Number(params.get('count')) || SHAPES_COUNT;
const enableShapes = !!params.get('shapes');