Files
callstack__agent-device/src/finders.ts
T
Michał Pierzchała f4f143ced7 fix: restore helper subpath exports (#402)
* fix: restore helper subpath exports

* fix: polish helper subpath typings
2026-04-11 22:16:32 +02:00

24 lines
761 B
TypeScript

export type { FindLocator } from './utils/finders.ts';
export type { SnapshotNode } from './utils/snapshot.ts';
export { normalizeRole, normalizeText, parseFindArgs } from './utils/finders.ts';
import {
findBestMatchesByLocator as findBestMatchesByLocatorInternal,
type FindLocator,
} from './utils/finders.ts';
import type { SnapshotNode } from './utils/snapshot.ts';
export type FindMatchOptions = {
requireRect?: boolean;
};
export function findBestMatchesByLocator(
nodes: SnapshotNode[],
locator: FindLocator,
query: string,
options?: boolean | FindMatchOptions,
) {
const matchOptions = typeof options === 'boolean' ? { requireRect: options } : options;
return findBestMatchesByLocatorInternal(nodes, locator, query, matchOptions);
}