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

Provide defaults for useUser()'s generic type parameters #6764

Closed
elle-j opened this issue Jun 27, 2024 · 4 comments
Closed

Provide defaults for useUser()'s generic type parameters #6764

elle-j opened this issue Jun 27, 2024 · 4 comments
Labels
First-Good-Issue First Good Issue - Relatively easy issue for new contributers

Comments

@elle-j
Copy link
Contributor

elle-j commented Jun 27, 2024

If you want to provide e.g. a type for the Atlas App Services functions defined (generic type param 1), currently you'd also need to provide types for the remaining generic type params:

const user = useUser<MyAppServicesFunctions, Record<string, unknown>, Realm.DefaultUserProfileData>();

We could provide defaults to reduce the verbosity:

const user = useUser<MyAppServicesFunctions>();
@elle-j elle-j added the First-Good-Issue First Good Issue - Relatively easy issue for new contributers label Jun 27, 2024
Copy link

sync-by-unito bot commented Jun 27, 2024

➤ PM Bot commented:

Jira ticket: RJS-2849

@kraenhansen
Copy link
Member

I agree - this feels like an oversight 👍

@vinibgoulart
Copy link

Can we close this? Already fixed in this PR: #6814

@kraenhansen
Copy link
Member

@vinibgoulart I think you're right 👍 Thanks for making that obvious 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-Good-Issue First Good Issue - Relatively easy issue for new contributers
Projects
None yet
Development

No branches or pull requests

3 participants