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 block tags for classes static fields #2135

Closed
Simek opened this issue Jan 1, 2023 · 5 comments
Closed

Missing block tags for classes static fields #2135

Simek opened this issue Jan 1, 2023 · 5 comments
Labels
bug Functionality does not match expectation

Comments

@Simek
Copy link

Simek commented Jan 1, 2023

Search terms

Hello, I'm in process of upgrading TypeDoc from latest 0.22 release to 0.23 in our codebase, and after resolving most of the breaking changes related to the comment content structure changes I have spotted that comments tags for the classes static, non-async fields are missing, but base comment text and return values are present in output JSON file.

No change to the package source has been made between TypeDoc version switch, when generating JSON files using 0.22 tags fields are present as expected, so it looks like a regression.

I have tried few other standard and custom tags, but it seems that all tags are omitted, when placed in the static class field description.

Expected Behavior

Comments tags are extracted, if defined for any class member.

Actual Behavior

blockTags field is missing for classes static fields.

Steps to reproduce the bug

Problematic comment:

Package TSConfig:

We are running TypeDoc programatically via Application:

Output JSON

Happy to provide more details, if needed.

Environment

  • TypeDoc version: 0.23.23
  • TypeScript version: 4.9.4
  • Node.js version: 16.17.1
  • OS: macOS 12.6
@Simek Simek added the bug Functionality does not match expectation label Jan 1, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 1, 2023

I'm going to have to ask for a reproduction that doesn't involve figuring out expo, too far from minimal. This seems to work in a very roughly cloned reproduction setup.

Code: TypeStrong/typedoc-repros#24
Job: https://github.com/TypeStrong/typedoc-repros/actions/runs/3817737949/jobs/6494190729#step:4:41

@Gerrit0 Gerrit0 added the needs reproduction Needs a minimal reproducible case label Jan 1, 2023
@Simek
Copy link
Author

Simek commented Jan 1, 2023

Fully understandable, I was able to reproduce it in isolation using your repro branch as base, by copying part of the Camera code, now I just need to narrow down the repro and strip unneeded parts. Going to follow up with repo/branch link.

@Simek
Copy link
Author

Simek commented Jan 1, 2023

The bug seems to be different than I have initially assumed, the culprit for the missing tag is fact that the description defined for the useCameraPermissions hook is overwritten by the default one for createPermissionsHook.

The quite minimal repro I was able to assemble is here:

The source for the extracted description is here:

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 2, 2023

Anything that depends on another module isn't minimal...

export class Camera {
  /** One */
  static useCameraPermissions = createPermissionHook();
}

/** Two */
export declare function createPermissionHook(): () => void;

@Gerrit0 Gerrit0 removed the needs reproduction Needs a minimal reproducible case label Jan 2, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 2, 2023

Ugh, this is another instance of functions being special... with an extra layer of indirection because of a reflection type.

@Gerrit0 Gerrit0 closed this as completed in 81ccecf Jan 2, 2023
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
None yet
Development

No branches or pull requests

2 participants