rxjs: type annotations are duplicated between typescript syntax and jsdoc

It seems like you have a lot of extra maintenance burden to have types in the jsdoc that match the types declared in TypeScript:

  /**
   * @param {Observer|function(value: T): void} [destinationOrNext] A partially
   * defined Observer or a `next` callback function.
   * @param {function(e: ?any): void} [error] The `error` callback of an
   * Observer.
   * @param {function(): void} [complete] The `complete` callback of an
   * Observer.
   */
  constructor(destinationOrNext?: PartialObserver<any> | ((value: T) => void),
              error?: (e?: any) => void,
              complete?: () => void) {

is there any benefit to having the types in JSDoc?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

oh, @blesh has your Netflix project seen https://github.com/angular/tsickle ?