Skip to content

Typescript definitions #15

@rbusquet

Description

@rbusquet

Subject of the feature

I'm using rehype-highlight with frameworks like nextjs and remix.run, and when importing the package, I get missing errors on missing type definitions when using TS.

Problem

TS linters error with Could not find a declaration file for module 'rehype-highlight'.. Not a huge problem--I see other packages in the org have their types defined.

Expected behavior

I should be able to import highlight from "rehype-highlight" without linter errors on TS.

Alternatives

  • @ts-ignore given that I just pass the module to a plugins list
  • use inline require

I'd be happy to help with a PR to add the types, following other examples!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted 🙏This could use your insight or help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions