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

Not able to see comments added in document created - React Native #2666

Closed
gilshaan opened this issue Aug 13, 2024 · 4 comments
Closed

Not able to see comments added in document created - React Native #2666

gilshaan opened this issue Aug 13, 2024 · 4 comments
Labels
bug Functionality does not match expectation needs reproduction Needs a minimal reproducible case

Comments

@gilshaan
Copy link

gilshaan commented Aug 13, 2024

Code

 /**
   * Returns a test string.
   * @returns {string} The test string "testText".
   * @example const printText = (): string => { return 'testText';};
   */
  const printText = (): string => {
    return 'testText';
  };
  /**
   * Returns sum of numbers.
   * @returns {number} The sum of digits.
   */
  const add = (a: number, b: number): number => {
    return a + b;
  };

Expected Behavior

To see the comments added and functions in document created

Environment

  • Typedoc version: 0.26.5
  • TypeScript version: 5.0.4
  • Node.js version: 21.4.0
  • OS: MacOS 14.5 (23F79)
@gilshaan gilshaan added the bug Functionality does not match expectation label Aug 13, 2024
@harivkrish47
Copy link

Code

 /**
   * Returns a test string.
   * @returns {string} The test string "testText".
   * @example const printText = (): string => { return 'testText';};
   */
  const printText = (): string => {
    return 'testText';
  };
  /**
   * Returns sum of numbers.
   * @returns {number} The sum of digits.
   */
  const add = (a: number, b: number): number => {
    return a + b;
  };

Expected Behavior

To see the comments added and functions in document created

Environment

  • Typedoc version: 0.26.5
  • TypeScript version: 5.0.4
  • Node.js version: 21.4.0
  • OS: MacOS 14.5 (23F79)

Hi @gilshaan, Displaying comments directly within JSX elements is not natively supported in documentation tools like TypeDoc, which typically focus on comments outside of JSX only.

@Oblarg
Copy link

Oblarg commented Aug 13, 2024

You should export the artifacts you want to render in your docs. By default, non-exported stuff is treated as internal details.

@gilshaan
Copy link
Author

Hi @Oblarg

I've been working on exporting all the necessary artifacts for TypeDoc, but I'm running into some issues where it's not rendering the details as expected, especially missing the comments before each function inside the code. I've ensured that TypeScript is generating the declaration files and that TypeDoc is configured properly.

Could you please let me know if there's a specific artifact that might be missing? Any insights or suggestions would be greatly appreciated.

Thank you!

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 17, 2024

Without some runnable reproduction to look at, it's basically impossible to say what's going on with your project. In the snippets you provided, the functions aren't exported, so it makes sense that TypeDoc wouldn't include them.

@Gerrit0 Gerrit0 added the needs reproduction Needs a minimal reproducible case label Aug 23, 2024
@Gerrit0 Gerrit0 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
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 needs reproduction Needs a minimal reproducible case
Projects
None yet
Development

No branches or pull requests

4 participants