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

Add Type to Keyring as generic type parameter #188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikesposito
Copy link
Member

@mikesposito mikesposito commented Jun 4, 2024

This PR adds the Type extends string generic type parameter to Keyring, making it Keyring<Type, String>. This will help to infer types coming from builders in KeyringController. In that regard, this PR also adds a KeyringBuilder type.

@mikesposito mikesposito requested a review from a team as a code owner June 4, 2024 13:51
@mikesposito mikesposito requested a review from a team June 4, 2024 13:54
@mikesposito mikesposito marked this pull request as draft June 4, 2024 14:12
@mikesposito
Copy link
Member Author

mikesposito commented Jun 4, 2024

Converting to draft until I have another draft PR on KeyringController to show how this would help

@MajorLift
Copy link
Contributor

Nit: Would it make sense to use Kind (i.e. type of type) instead of Type here as the name of the generic parameter (and "kind" instead of "type" as the type property name), since we're trying to specify sub-categories of the Keyring type?

The term "type" is generally used for categories of values not types. Here's an example of "kind" being used in the TypeScript documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants