Sha256: 3cfb7c0c642b19fb75132154040bb7cd840f0002f9955b14154e69611b9b3f81
Contents?: true
Size: 1.25 KB
Versions: 26
Compression:
Stored size: 1.25 KB
Contents
import {ARIARole} from 'aria-query' export type MatcherFunction = ( content: string, element: Element | null, ) => boolean export type Matcher = MatcherFunction | RegExp | number | string // Get autocomplete for ARIARole union types, while still supporting another string // Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939 export type ByRoleMatcher = ARIARole | (string & {}) export type NormalizerFn = (text: string) => string export interface NormalizerOptions extends DefaultNormalizerOptions { normalizer?: NormalizerFn } export interface MatcherOptions { exact?: boolean /** Use normalizer with getDefaultNormalizer instead */ trim?: boolean /** Use normalizer with getDefaultNormalizer instead */ collapseWhitespace?: boolean normalizer?: NormalizerFn /** suppress suggestions for a specific query */ suggest?: boolean } export type Match = ( textToMatch: string, node: HTMLElement | null, matcher: Matcher, options?: MatcherOptions, ) => boolean export interface DefaultNormalizerOptions { trim?: boolean collapseWhitespace?: boolean } export function getDefaultNormalizer( options?: DefaultNormalizerOptions, ): NormalizerFn // N.B. Don't expose fuzzyMatches + matches here: they're not public API
Version data entries
26 entries across 26 versions & 1 rubygems