mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
39 lines
No EOL
856 B
TypeScript
39 lines
No EOL
856 B
TypeScript
import { makeInjector } from "@hypersphere/dity";
|
|
import { MainModule } from "./module";
|
|
|
|
type InitFn = () => void
|
|
|
|
|
|
@(makeInjector<MainModule, 'factory'>()([
|
|
'settings.init',
|
|
'editor.init',
|
|
'syntaxHighlight.init',
|
|
'contextMenu.init',
|
|
'sync.init',
|
|
'api.init',
|
|
'globalTables.init',
|
|
'explorer.init'
|
|
]))
|
|
export class Init {
|
|
async make(
|
|
settingsInit: InitFn,
|
|
editorInit: InitFn,
|
|
highlighInit: InitFn,
|
|
contextMenu: InitFn,
|
|
syncInit: InitFn,
|
|
apiInit: InitFn,
|
|
globalTablesInit: InitFn,
|
|
explorerInit: InitFn
|
|
) {
|
|
return () => {
|
|
settingsInit()
|
|
editorInit()
|
|
highlighInit()
|
|
contextMenu()
|
|
syncInit()
|
|
apiInit()
|
|
globalTablesInit()
|
|
explorerInit()
|
|
}
|
|
}
|
|
} |