Skip to content

Typescript support #4

Closed
Closed
@ericdmoore

Description

@ericdmoore

Subject of the feature

Are you open to adding an index.d.ts file?

Problem

I made a d.ts for this - that I have been using. Happy to PR it back to the project.

Expected behavior

VS Code Intelisense to show expected types.

Alternatives

I could submit directly to DefinitelyTyped - but I think their bots may ping you anyway. (Not sure, never PRd to DT before)

Activity

ChristianMurphy

ChristianMurphy commented on Mar 12, 2021

@ChristianMurphy
Member

We are, you can see some examples of types being added in
syntax-tree/xast-util-sitemap#1, syntax-tree/hast-util-sanitize#21, and syntax-tree/mdast-util-to-string#5
Note that for types as a dts file, using DTSLint and/or type coverage is highly recommended.

More recently there has been a push to get types generated from JSDoc
wooorm/zwitch@88b233d and wooorm/zwitch#6

Either works, and a PR would be welcome!


Closing this issue as we don't want to keep a types tracker issue in each of the 300+ unified repos.

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ChristianMurphy@ericdmoore

        Issue actions

          Typescript support · Issue #4 · syntax-tree/hast-util-select