-
Notifications
You must be signed in to change notification settings - Fork 268
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
Why underscore private _domainEvents
in AggregateRoot?
#18
Comments
_domainEvents
in AggregateRoot?
Hey, I believe that this is only a stylistic choice. In general, it's a common JS convention and even though it's not needed in TS lot's of developers still use it for readability. |
Thanks for getting back to me @adriana-olszak :) I understand what you are saying, I was more curious because in The SOLID book, Khalil specifically says to not do that in TypeScript:
I was curious if there was a particular reason, or just a mistake here :) |
I think I understand now. We use |
Hi @stemmlerjs ! Thank you for your efforts and your lessons. I've been reading a LOT of your blog and bought your book to learn more about DDD. I'm wondering why you've underscored
_domainEvents
here? From what I've learned from you, we don't have to do this in typescript since we already have access to theprivate
keyword. Is there something I'm missing?white-label/src/core/domain/AggregateRoot.ts
Line 8 in 503ee49
The text was updated successfully, but these errors were encountered: