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

Missing documentation comment from curried exports #1421

Closed
Pajn opened this issue Dec 26, 2020 · 2 comments
Closed

Missing documentation comment from curried exports #1421

Pajn opened this issue Dec 26, 2020 · 2 comments
Labels
bug Functionality does not match expectation

Comments

@Pajn
Copy link

Pajn commented Dec 26, 2020

Search terms

beta
missing documentation
missing doc comments

Expected Behavior

With an export like this:

/**
 * Returns true if fn returns true for every item in the iterator
 *
 * Returns true if the iterator is empty
 *
 * ## Example
 * ```typescript
 * all(e => e > 1, [1, 2, 3]) // false
 * all(e => e > 0, [1, 2, 3]) // true
 * all(e => e > 1, [])        // true
 * ```
 */
export const all: {
  <T>(fn: (item: T) => boolean, iterator: IterableOrIterator<T>): boolean
  <T>(fn: (item: T) => boolean): (iterator: IterableOrIterator<T>) => boolean
} = curry2(function all<T>(
  fn: (item: T) => boolean,
  iterator: IterableOrIterator<T>,
): boolean {
  for (const item of asIterable(iterator)) {
    if (!fn(item)) {
      return false
    }
  }

  return true
})

typedoc should generate documentation that includes both the two signatures as well as the written documentation with the example.

Actual Behavior

typedoc only generates documentation for the two signatures but the written documentation is missing.

Steps to reproduce the bug

Environment

  • Typedoc version: 0.20.0-beta.27
  • TypeScript version: 4.1.3
  • Node.js version: 15.5.0
  • OS: Ubuntu 20.10
@Pajn Pajn added the bug Functionality does not match expectation label Dec 26, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 26, 2020

Fixed in beta 29 - this was a tricky one...

image

Gerrit0 added a commit that referenced this issue Dec 26, 2020
@Gerrit0 Gerrit0 added this to To do in Version 0.20 via automation Dec 26, 2020
@Gerrit0 Gerrit0 moved this from To do to Done in Version 0.20 Dec 26, 2020
@Pajn
Copy link
Author

Pajn commented Dec 27, 2020

I tested version 0.20.0-beta.31 now. It works great. Thank you!

@Pajn Pajn closed this as completed Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
No open projects
Development

No branches or pull requests

2 participants