-
-
Notifications
You must be signed in to change notification settings - Fork 232
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(types): ClientId type definition #741
fix(types): ClientId type definition #741
Conversation
Pull Request Test Coverage Report for Build 2315302523
💛 - Coveralls |
Pull Request Test Coverage Report for Build 2315302523Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I just tried: export type Subscription = ISubscription & { clientId: ClientId } (making If we can go this route we would not need any updates to Happy to commit this if you all agree. Kind regards, |
I'm not sure it's 100% correct to make that property required, It depends if it's intended as a subscription request or a subscription that flows inside aedes, in first case the clientId could be undefined. Sorry I already merged this as I didn't see your comment (it's morning in Italy I think I need my cup of coffee 😆 ) , in types for example it is also used here and there is no need to add a clientId |
Ok, then I suggest we overload Subscription and Subscriptions in export type Subscription = ISubscription & { clientId: ClientId }
export type Subscriptions = { subscriptions: Subscription[] } alternatively we add: export type PersistanceSubscription = ISubscription & { clientId: ClientId }
export type PersistanceSubscriptions = { subscriptions: Subscription[] } here. What do you think ? Kind regards, |
I personally prefer the second solution, go for |
Seems like I need more of your Italian coffee as well :-) The problem lies in the definition of ClientId in Line 7 in f3b4b16
So this PR is superfluous :-( I tested on My suggestion is the following:
Ok ? Kind regards, |
👍🏼 |
As discussed in moscajs/aedes-cached-persistence#52 (comment)
Next step will be to import this definition in
aedes-persistence
Kind regards,
Hans