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

API doc generation removes children when function is optional #107145

Closed
timroes opened this issue Jul 29, 2021 · 2 comments · Fixed by #107236
Closed

API doc generation removes children when function is optional #107145

timroes opened this issue Jul 29, 2021 · 2 comments · Fixed by #107236
Assignees
Labels
APIDocs Team:Operations Team label for Operations Team

Comments

@timroes
Copy link
Contributor

timroes commented Jul 29, 2021

There seems to be some edge-cases when generating the API docs, that are causing the children object in the output to vanish if the function itself is optional. See https://github.com/elastic/kibana/pull/107128/files for an example where this happened.

@timroes timroes added Team:Operations Team label for Operations Team APIDocs labels Jul 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@stacey-gammon
Copy link
Contributor

Confirmed the bug with a test. Now to figure out why.

  ● interfaces and classes › Optional function on interface includes children

    expect(received).toBeDefined()

    Received: undefined

      430 |     expect(fn).toBeDefined();
      431 |     expect(fn?.type).toBe(TypeKind.FunctionKind);
    > 432 |     expect(fn?.children).toBeDefined();
          |                          ^
      433 |     expect(fn?.children?.length).toBe(1);
      434 |   });
      435 |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIDocs Team:Operations Team label for Operations Team
Projects
None yet
3 participants