Skip to content

Commit

Permalink
Change type
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Apr 12, 2024
1 parent 3a2c499 commit 2c2dd28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ export type LoaderFunction<TRenderer extends Renderer = Renderer, TArgs = Args>
) => Promise<Record<string, any> | void> | Record<string, any> | void;

type Awaitable<T> = T | PromiseLike<T>;
export type CleanupCallback = (() => Awaitable<unknown>) | void;
export type CleanupCallback = () => Awaitable<unknown>;

export type BeforeEach<TRenderer extends Renderer = Renderer, TArgs = Args> = (
context: StoryContextForLoaders<TRenderer, TArgs>
) => Awaitable<CleanupCallback>;
) => Awaitable<CleanupCallback | void>;

export interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args>
extends StoryContextForLoaders<TRenderer, TArgs> {
Expand Down

0 comments on commit 2c2dd28

Please sign in to comment.