import { InternalOptions } from './options' ; import type { Node , Document } from 'domhandler' ; import { BasicAcceptedElems } from './types' ; import * as Attributes from './api/attributes' ; import * as Traversing from './api/traversing' ; import * as Manipulation from './api/manipulation' ; import * as Css from './api/css' ; import * as Forms from './api/forms' ; type AttributesType = typeof Attributes ; type TraversingType = typeof Traversing ; type ManipulationType = typeof Manipulation ; type CssType = typeof Css ; type FormsType = typeof Forms ; export abstract class Cheerio < T > implements ArrayLike < T > { length = 0 ; [ index ] : T ; options : InternalOptions ; private _root : Cheerio < Document > | null ; private param elements param root param options constructor ( elements , root , options ) { this . options = options ; this . _root = root ; if ( elements ) { for ( let idx = 0 ; idx < elements . length ; idx ++ ) { this [ idx ] = elements [ idx ] ; } this . length = elements . length ; } } prevObject : Cheerio < any > | undefined ; private param dom param context returns abstract _make < T > ( dom , context ? ) ; private param content param options param isDocument returns abstract _parse ( content , options , isDocument ) ; private param dom returns abstract _render ( dom ) ; } export interface Cheerio < T > extends AttributesType , TraversingType , ManipulationType , CssType , FormsType , Iterable < T > { cheerio : '[cheerio object]' ; splice : typeof Array . prototype . slice ; } /** Set a signature of the object. */ Cheerio . prototype . cheerio = '[cheerio object]' ; Cheerio . prototype . splice = Array . prototype . splice ; Cheerio . prototype [ Symbol . iterator ] = Array . prototype [ Symbol . iterator ] ; Object . assign ( Cheerio . prototype , Attributes , Traversing , Manipulation , Css , Forms ) ;