Patch Changes
-
aaa891a:
createAsyncLogicno longer rejects arunthat returns a literal matchingschemas.output. Previously a parameterlessrunwidened{ kind: 'a' }to{ kind: string }, so the call failed with "not assignable to type 'never'", including insidemachine.provide({ actors }). Arunthat does not matchschemas.outputnow reports the output mismatch.type Outcome = { kind: 'a' } | { kind: 'b'; n: number }; const load = createAsyncLogic({ schemas: { input: types<{ id: string }>(), output: types<Outcome>() }, run: async () => ({ kind: 'a' }) // OK, output is `Outcome` });
A parameterless
runnow keeps literal return types wheneverschemasis provided, including input-only and error-only schemas. Withoutschemas, outputs still widen ({ ok: true }is{ ok: boolean }).