mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(editor): remove block models global type (#10086)
This commit is contained in:
@@ -1,19 +1,5 @@
|
||||
import type { BlockModel } from './block/block-model.js';
|
||||
|
||||
export * from './block/index.js';
|
||||
export * from './doc.js';
|
||||
export * from './store/index.js';
|
||||
export * from './workspace.js';
|
||||
export * from './workspace-meta.js';
|
||||
|
||||
declare global {
|
||||
namespace BlockSuite {
|
||||
interface BlockModels {}
|
||||
|
||||
type Flavour = string & keyof BlockModels;
|
||||
|
||||
type ModelProps<Model> = Partial<
|
||||
Model extends BlockModel<infer U> ? U : never
|
||||
>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ export class Store {
|
||||
);
|
||||
}
|
||||
|
||||
getSchemaByFlavour(flavour: BlockSuite.Flavour) {
|
||||
getSchemaByFlavour(flavour: string) {
|
||||
return this._schema.flavourSchemaMap.get(flavour);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user