Created
February 3, 2025 08:48
-
-
Save domosedov/bb60e31742e26a34824251c1d93af01d to your computer and use it in GitHub Desktop.
Effector typed withFactory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-expect-error effector does not have public types of withFactory | |
import { withFactory as withFactoryBase } from 'effector'; | |
type WithFactory = <R>({ | |
sid, | |
name, | |
loc, | |
method, | |
fn, | |
}: { | |
sid: string; | |
name?: string; | |
loc?: unknown; | |
method?: string; | |
fn: () => R; | |
}) => R; | |
export const withFactory = withFactoryBase as WithFactory; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment