mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): move extension to store (#9552)
This commit is contained in:
17
blocksuite/framework/store/src/extension/index.ts
Normal file
17
blocksuite/framework/store/src/extension/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { Container } from '@blocksuite/global/di';
|
||||
|
||||
/**
|
||||
* Generic extension.
|
||||
* Extensions are used to set up the dependency injection container.
|
||||
* In most cases, you won't need to use this class directly.
|
||||
* We provide helper classes like `CommandExtension` and `BlockViewExtension` to make it easier to create extensions.
|
||||
*/
|
||||
export abstract class Extension {
|
||||
static setup(_di: Container): void {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
export interface ExtensionType {
|
||||
setup(di: Container): void;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
/// <reference path="../shim.d.ts" />
|
||||
|
||||
export * from './adapter/index.js';
|
||||
export * from './extension/index.js';
|
||||
export * from './model/index.js';
|
||||
export * from './reactive/index.js';
|
||||
export * from './schema/index.js';
|
||||
|
||||
Reference in New Issue
Block a user