Skip to content

Improve the "JSON" view to include generic parameters #2455

Closed
@ericmorand

Description

@ericmorand

This is a follow up to the very nice implementation of the feature request Add JSON view for interfaces.

Would it be possible to have the generic parameters displayed in the JSON view? In its current state, it looks a bit strange to have some properties of an interface typed with a type that is not resolved to anything, like in the following example:

https://twing-api.nightlycommit.com/interfaces/TwingBaseNode.html

Here, attributes, children and type have types that don't reference anything. Of course, they are defined later on in the page, but it still seems off to have types in the JSON view that don't reference anything.

Something like that would be cool:

interface TwingBaseNode<
    Type extends string | null = any,
    Attributes extends TwingBaseNodeAttributes = TwingBaseNodeAttributes,
    Children extends TwingBaseNodeChildren = TwingBaseNodeChildren
> {
    attributes: Attributes;
    children: Children;
    column: number;
    line: number;
    tag: null | string;
    type: Type;
    execute(executionContext): Promise<any>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasier issue for first time contributorshelp wantedContributions are especially encouraged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions