feat: Only make the .const for the GetWrapperData only available on main

This commit is contained in:
BluJ
2023-04-27 12:59:27 -06:00
parent f992d6cb8f
commit 05260b858b
4 changed files with 42 additions and 13 deletions

View File

@@ -26,13 +26,13 @@ export const setupMain = <WrapperData>(
fn: (o: {
effects: Effects
started(onTerm: () => void): null
utils: Utils<WrapperData>
utils: Utils<WrapperData, {}>
}) => Promise<Daemons<any>>,
): ExpectedExports.main => {
return async (options) => {
const result = await fn({
...options,
utils: utils<WrapperData>(options.effects),
utils: utils<WrapperData, {}>(options.effects),
})
await result.build().then((x) => x.wait())
}