Skip to content

How do you add methods when using typescript? #1778

@mikestopcontinues

Description

@mikestopcontinues

I believe I might have found an issue with how cheerio exports types, but I'm new to typescript, so I'm not sure I'm not just missing how to get it done.

I'm running v1.0.0-rc.5, and I'd like to be able to add some methods to the Cheerio interface, so that when I run a selector query, I get back the full api (both mine and the core methods). I had better luck using @types/cheerio, as it seemed to expose more of the API, but I wasn't able to get it fully working there either. For that reason, I'm not sure #1682 is going to fully solve the problem.

I'd like to be able to include a code sample, but working against v1, nothing I came up with is close. If it is possible with the current release, I'd just like to know how to do it. Thanks!

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