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

tiny tweak for better type safety #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefanoslig
Copy link

@stefanoslig stefanoslig commented Jan 22, 2019

This tweak improves the type safety on the exported api.

There is one more trivial thing that I wanted to mention, not related to the above issue.
In the core.ts file there is an exported interface called Observable. I believe that this interface which is also used in the react.ts file for example should be better to have a different name or to be private because in the future it might lead to misconceptions. The rxjs Observable and the native js Observable(in the future) have a different shape than the one in this library. So, a name like Rval instead of Observable would be more intuitive. Also I would change ObservableValue => Subject and ObservableAdministration => SubjectAdministration. Traditionally, Subjects are "multicast". That means that a subject can have multiple listeners and state like your implementation. On the other hand an Observable is always unicast.

Nevertheless, they are just names.

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.

None yet

1 participant