UNPKG

unist-utils-core

Version:

A collection of commonly used (albeit enhanced) algorithms based on unist and unist-util-xxx

9 lines (8 loc) 469 B
import { Node, Parent } from './nodes'; import { Test as uuTest, TestFunction as uuTestFunction } from 'unist-util-is'; type BoolTestFn<T extends Node> = (node: T, index?: number, parent?: Parent) => boolean; export type TestFunction<T extends Node> = BoolTestFn<T> | uuTestFunction<T>; export type Test<T extends Node> = uuTest<T> | TestFunction<T>; type ConvertFn = <T extends Node>(test: Test<T>) => TestFunction<T>; export declare const test: ConvertFn; export {};