Skip to content

Instantly share code, notes, and snippets.

@ericdmoore
Created March 12, 2021 21:23
Show Gist options
  • Save ericdmoore/0d1219ae22df612fc394770990365522 to your computer and use it in GitHub Desktop.
Save ericdmoore/0d1219ae22df612fc394770990365522 to your computer and use it in GitHub Desktop.
Type Declarations for `hast-util-select`
// Type definitions for `hast-util-select` 4.0.1
// Project: https://github.com/syntax-tree/hast-util-select#readme
// Definitions by: ericdmoore <https://github.com/ericdmoore>
// TypeScript Version: 4.0
//
declare module 'hast-util-select'{
import type { Node } from 'unist'
export interface HastNode extends Node{
properties: {[key:string]:any}
}
export function matches (selector:string, node:Node, space?: 'svg' |'html'): boolean
export function select (selector:string, node:Node, space?: 'svg' |'html'): HastNode
export function selectAll (selector:string, node:Node, space?: 'svg' |'html'): HastNode[]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment