Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react): atom type inference in hooks #1866

Merged
merged 5 commits into from
Apr 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove conflicting type
Thisen committed Apr 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit aab92387e01af0e9c5eaef82c85ae924f9b3a03b
5 changes: 0 additions & 5 deletions src/react/useAtom.ts
Original file line number Diff line number Diff line change
@@ -32,11 +32,6 @@ export function useAtom<
SetAtom<ExtractAtomArgs<AtomType>, ExtractAtomResult<AtomType>>
]

export function useAtom<AtomType extends Atom<unknown>>(
atom: AtomType,
options?: Options
): [Awaited<ExtractAtomValue<AtomType>>, never]

export function useAtom<Value, Args extends unknown[], Result>(
atom: Atom<Value> | WritableAtom<Value, Args, Result>,
options?: Options