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

inherit interface/type block comment #58940

Closed
6 tasks done
Tzxhy opened this issue Jun 20, 2024 · 2 comments
Closed
6 tasks done

inherit interface/type block comment #58940

Tzxhy opened this issue Jun 20, 2024 · 2 comments
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript

Comments

@Tzxhy
Copy link

Tzxhy commented Jun 20, 2024

πŸ” Search Terms

comment inherit

βœ… Viability Checklist

⭐ Suggestion

Add more block comment mechanism.

πŸ“ƒ Motivating Example

export enum TreeNodeExpanderStatus {
    /** full expanded */
    FullExpanded,
    /** full collapsed */
    FullCollapsed,
    /** partial expanded */
    PartialExpanded,
}
interface Props {
    

    status: TreeNodeExpanderStatus
    /** callback when click expand icon */
    onClickExpand(): void;
    /** callback when click collapse icon */
    onClickCollapse(): void;
}

When i use IDE to see Props.status, shows:
image

But if it can show the TreeNodeExpanderStatus comment, it will better. Right? Like this:
image

Also, this should work when no other comments upper on property status.

πŸ’» Use Cases

  1. What do you want to use this for?

  2. What shortcomings exist with current approaches?

  3. What workarounds are you using in the meantime?

  4. Write less comments.

  5. No appropriate comments inheritance mechanism.

  6. Write more comments.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Declined The issue was declined as something which matches the TypeScript vision labels Jun 20, 2024
@RyanCavanaugh
Copy link
Member

This gets very confusing because you don't know whether the comment is referring to the type or the property.

It's also very noisy because it means comments for commonly-used types (RegEx, etc) show up everywhere which is very rarely useful

@typescript-bot
Copy link
Collaborator

This issue has been marked as "Declined" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants