Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Document JSDoc imports with generics #1106

Description

@gregtatum

The JSDoc types do not include an example of importing a type with a generic.

e.g. this is the correct way:

/**
 * @template T
 * @typedef {import("../types").ThunkAction<T>} ThunkAction<T>
 *

I won't enumerate the wrong ways I tried :D

It took me a good hour to figure it out, with lots of searching. I could not find any examples anywhere in the docs, nor in Stack Overflow. I figured someone else could benefit from my confusion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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