You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
I have a couple of thoughts on trying to improve the Method Signature and I would like to get some extra feedback/thoughts from others.
public access modifier
In our new documentation every method currently starts with the public access modifier. In my opinion this is not really that helpful. All of the methods in the documentation are - as far as I know - public. So why not remove public from the signature?
parameter types
In the documentation we're adding the type of every parameter in the method signature. In my opinion this does not really help that much. Especially because the types of most parameters are either simple to deduce based on the name of the parameter or are complex types where additional research would still be necessary. Adding to that is the fact that we're adding every parameter and its type to a table where people can look up further explanation on the parameter.
Here is an example: fromEvent(target: EventTargetLike, eventName: string, options: EventListenerOptions, selector: SelectorMethodSignature): Observable
If I look at the options parameter, the fact that it is an EventListenerOptions object could help me in figuring out that it has to do with the addEventListener function, but when I'm completely new to rxjs, I'm not sure if I'll understand it like that without additional research.
Also the SelectorMethodSignature type, doesn't really explain that much more than what the name of the parameter doesn't explain by itself.
The return type of the method however (the fact that it returns Observable) is a keeper in my opinion.
As per #168 I'm fine with deducing the type of every parameter based on further documentation, but maybe we could add that information when hovering over a parameter in the signature?
Other people's thoughts?
The text was updated successfully, but these errors were encountered:
Thanks for this proposal @DiedrikDM . You got definetly some points. I totally agree about the access modifier with you. But I think that the parameter list should be well described due to the wide range of possibilities. But I think a link to the type would be helpful too.
Hi everybody,
I have a couple of thoughts on trying to improve the Method Signature and I would like to get some extra feedback/thoughts from others.
public access modifier
In our new documentation every method currently starts with the public access modifier. In my opinion this is not really that helpful. All of the methods in the documentation are - as far as I know - public. So why not remove public from the signature?
parameter types
In the documentation we're adding the type of every parameter in the method signature. In my opinion this does not really help that much. Especially because the types of most parameters are either simple to deduce based on the name of the parameter or are complex types where additional research would still be necessary. Adding to that is the fact that we're adding every parameter and its type to a table where people can look up further explanation on the parameter.
Here is an example:
fromEvent(target: EventTargetLike, eventName: string, options: EventListenerOptions, selector: SelectorMethodSignature): Observable
As per #168 I'm fine with deducing the type of every parameter based on further documentation, but maybe we could add that information when hovering over a parameter in the signature?
Other people's thoughts?
The text was updated successfully, but these errors were encountered: