mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-31 21:59:10 +08:00
refactor(editor): remove selection global types (#9532)
Closes: [BS-2217](https://linear.app/affine-design/issue/BS-2217/remove-global-types-in-selection)
This commit is contained in:
@@ -1,27 +1,3 @@
|
||||
import type {
|
||||
BlockSelection,
|
||||
CursorSelection,
|
||||
SurfaceSelection,
|
||||
TextSelection,
|
||||
} from './variants/index.js';
|
||||
|
||||
export * from './base.js';
|
||||
export * from './manager.js';
|
||||
export * from './variants/index.js';
|
||||
|
||||
declare global {
|
||||
namespace BlockSuite {
|
||||
interface Selection {
|
||||
block: typeof BlockSelection;
|
||||
cursor: typeof CursorSelection;
|
||||
surface: typeof SurfaceSelection;
|
||||
text: typeof TextSelection;
|
||||
}
|
||||
|
||||
type SelectionType = keyof Selection;
|
||||
|
||||
type SelectionInstance = {
|
||||
[P in SelectionType]: InstanceType<Selection[P]>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user