-
Notifications
You must be signed in to change notification settings - Fork 62
Resolve signature from name, parameters and return type values #168
Comments
I support this as the return type is important and missed from the documentation unless the return type is 100% observable objects. I think surrounding an optional parameter with square brackets [ ] may be more convenient. |
I propose this notation for optional parameters as it is the one used in Typescript: https://www.typescriptlang.org/docs/handbook/functions.html (see Optional and Default Parameters paragraph) |
In fact, we could adapt the display of the signature depending on the choice of the user to see it in Javascript or Typescript. |
The return type will always be Observable for operators, unless there is something I'm missing? |
The partition operator for example does not return an Observable but a pair. |
@feloy The return is an observable sequence of pair. The return is still an observable. |
We have obsarvable, obsarvable, [obsarvable, observable] as a return. They are not the same. I think developers are interested to know the type of output they expected. |
Resolve signature from name, parameters and return type values as per ReactiveX#168. This change includes an update to the OperatorDoc type, because the return type of every operator needed to be included. All existing operators have been updated as well to include the correct return type. Some updates to the css were required to add colors to the signature. Added a new pipe (ArgumentPipe) to create a nice tooltip when hovering over the arguments.
For the moment, the signatures of the operators are defined as simple strings, but these signatures could be resolved from other information:
This way, we could be able to display the signatures in a more friendly and adaptable way.
For example:
contains all the necessary information to write:
or, if one prefer:
The text was updated successfully, but these errors were encountered: