blu-j paired changes

This commit is contained in:
Shadowy Super Coder
2024-03-20 13:43:34 -06:00
parent 41bc519855
commit ddd5e4c76d
8 changed files with 11 additions and 9 deletions

View File

@@ -3,11 +3,11 @@ import { Effects, ExposeServicePaths, ExposeUiPaths } from "../types"
export type SetupExports<Store> = (opts: { effects: Effects }) =>
| {
ui: { [k: string]: ExposeUiPaths<Store> }
services: ExposeServicePaths<Store>
services: ExposeServicePaths<Store>["paths"]
}
| Promise<{
ui: { [k: string]: ExposeUiPaths<Store> }
services: ExposeServicePaths<Store>
services: ExposeServicePaths<Store>["paths"]
}>
export const setupExports = <Store>(fn: (opts: SetupExports<Store>) => void) =>

View File

@@ -25,7 +25,7 @@ export function setupInit<Manifest extends SDKManifest, Store>(
input: null,
})
const { services, ui } = await setupExports(opts)
await opts.effects.exposeForDependents(services)
await opts.effects.exposeForDependents({ paths: services })
await opts.effects.exposeUi(forExpose(ui))
},
uninit: async (opts) => {