Skip to content

Does this support TypeScript typings in JSDoc? #1612

Closed
@goldingdamien

Description

@goldingdamien

Can I use TypeScript typings in JSDoc comments and still get full documentation?
Are there any restrictions that should be known?

Regards.

Examples:

/**
* @typedef {import('my-ts-file-or-library').ExportedType} ExportedType
* @typedef {Record<Exclude<"A"|"B"|"C", "C">, string>} InlineTypeScript
*/

/**
* @param {ExportedType} a
* @param {InlineTypeScript} b
*/
function myFunction (a, b) {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions