Skip to content

Extend @interface support to @typedefs #3050

@stwlam

Description

@stwlam

Search Terms

interface typedef

Problem

type Foo = { a: number; b: boolean };

/** @interface */
type Bar = Omit<Foo, "b">; // Expands to { a: number }
/**
 * @typedef Foo
 * @property {number} a
 * @property {boolean} b
 */

/**
 * @typedef {Omit<Foo, "b">} Bar
 * Still rendered as `Omit<Foo, "b">`
 * @interface
 */

Suggested Solution

The rendered result is the same between typescript and javascript.

I understand javascript support isn't the primary focus of this project. If there is a disinclination to extend the @interface feature, would it at all be feasible as a plugin (before I dive in myself to try)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions