jan/web/services/coreService.ts
Louis 1143bd3846
refactor: jan extensions (#799)
* refactor: rename plugin to extension
2023-12-01 11:30:29 +07:00

19 lines
437 B
TypeScript

import * as restAPI from './cloudNativeService'
import { EventEmitter } from './eventsService'
export const setupCoreServices = () => {
if (typeof window === 'undefined') {
console.debug('undefine', window)
return
} else {
console.debug('Setting up core services')
}
if (!window.core) {
window.core = {
events: new EventEmitter(),
api: window.electronAPI ?? {
...restAPI,
},
}
}
}