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

feat(StoreRegistry): add StoreOf and PieceOf #349

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

kyranet
Copy link
Member

@kyranet kyranet commented Nov 15, 2023

With this PR, Piece#store is now typed as StoreOf<StoreName>, which means that by passing a second type parameter in the piece's class, StoreName, the type gets strictly typed as the store that contains it. For example, in Framework, StoreOf<'commands'> returns CommandStore, and PieceOf<'commands'> returns Command<Args, CommandOptions>,

@favna favna merged commit 7b0ae1d into main Nov 16, 2023
5 checks passed
@favna favna deleted the types/store-registry/add-type-utilities branch November 16, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants