Skip to content

cem(typedef): introduce @import feature  #1159

@Galimede

Description

@Galimede

Currently we're using the @typedef jsDoc tag, example:

/**
* @typedef {import('./cc-kv-explorer.types.d.ts').CcKvExplorerStateLoaded} CcKvExplorerStateLoaded
*/

But with the release of typescript 5.5.4, we could now use the @import annotation like so:

/**
* @import { CcKvExplorerStateLoaded } from './cc-kv-explorer.types.d.ts'
*/

We could modifiy our plugin to allow this syntax.
The idea would be to first support this feature and then modify the @typedef in our files.
However, we need this CEM PR to be merged and released beforehand:
open-wc/custom-elements-manifest#268

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