Skip to content

Standardize method names for clarity #49

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

Open
Firehed opened this issue Aug 13, 2024 · 0 comments
Open

Standardize method names for clarity #49

Firehed opened this issue Aug 13, 2024 · 0 comments
Labels
breaking change feedback wanted Extra attention is needed
Milestone

Comments

@Firehed
Copy link
Contributor

Firehed commented Aug 13, 2024

Related to #48 (and, to lesser degrees, #36 and #47) , keeping the method names more consistent would also be quite valuable.

Here's about where I'm at, modulo naming tweaks from #48:

function createCredential({ username: string }) // + displayName
function createInBackground({ username: string }) // ^

function auth({ id, username }) // or, not both
function autofill()

I somewhat like keeping the object arguments, since the structural typing of TS (and general vanilla JS semantics) should let you provide an already-hydrated user object in a lot of cases, assuming it has an id property (probably common) and/or username (realistically less common, although still works nice on many auth forms)

@Firehed Firehed added feedback wanted Extra attention is needed breaking change labels Aug 13, 2024
@Firehed Firehed added this to the 1.0 milestone Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change feedback wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant