Skip to content

How to use cheerio interface #1696

@keyiis

Description

@keyiis

I used cheerio in typescript ,i need pass cheerio.Root Object in different method

import * as cheerio from 'cheerio';
async function parse(html:string){
        let $ = cheerio.load(html);
        methodA($);
 }
function methodA($:cheerio.Root){
     ......
}

but vscode prompted an error
image
I find Root type in index.d.ts
image

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