mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
refactor(editor): remove global gfx tool types (#12119)
This commit is contained in:
@@ -90,10 +90,6 @@ export {
|
||||
} from './surface-middleware.js';
|
||||
export {
|
||||
BaseTool,
|
||||
type GfxToolsFullOption,
|
||||
type GfxToolsFullOptionValue,
|
||||
type GfxToolsMap,
|
||||
type GfxToolsOption,
|
||||
type ToolOptions,
|
||||
type ToolOptionWithType,
|
||||
type ToolType,
|
||||
|
||||
@@ -75,8 +75,6 @@ export interface ToolEventTarget {
|
||||
): void;
|
||||
}
|
||||
|
||||
export const eventTarget = Symbol('eventTarget');
|
||||
|
||||
export class ToolController extends GfxExtension {
|
||||
static override key = 'ToolController';
|
||||
|
||||
|
||||
@@ -123,16 +123,3 @@ export type ToolOptionWithType<T extends BaseTool = BaseTool> = {
|
||||
toolType?: ToolType<T>;
|
||||
options?: ToolOptions<T>;
|
||||
};
|
||||
|
||||
export interface GfxToolsMap {}
|
||||
|
||||
export interface GfxToolsOption {}
|
||||
|
||||
export type GfxToolsFullOption = {
|
||||
[Key in keyof GfxToolsMap]: Key extends keyof GfxToolsOption
|
||||
? { type: Key } & GfxToolsOption[Key]
|
||||
: { type: Key };
|
||||
};
|
||||
|
||||
export type GfxToolsFullOptionValue =
|
||||
GfxToolsFullOption[keyof GfxToolsFullOption];
|
||||
|
||||
Reference in New Issue
Block a user