Skip to content
Myr

feature: Export the type of a recipe as `Produce` (#968)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feature: add type for producer function * IProducer -> Producer

authored by feihe · committed by GitHub · parent 23afcf1 · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Michel Weststrate <mweststrate@gmail.com>

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:src/types/types-external.ts+5 added
250 unmodified lines
251 listener?: PatchListener252 ): Promise<PatchesTuple<Base>>253}254255/**256 * The type for `recipe function`257 */258export type Producer<T> = (draft: Draft<T>) => ValidRecipeReturnType<Draft<T>> | Promise<ValidRecipeReturnType<Draft<T>>>259260// Fixes #507: bili doesn't export the types of this file if there is no actual source in it..261// hopefully it get's tree-shaken away for everyone :)262export function never_used() {}