type ComponentMatcher<C> = | "first" | "last" | number | C["id"] | ComponentGlobPattern | Partial<C> | (component, index) => boolean;Unified component matcher type supporting all matching strategies.
'first'/'last'- Match first or last componentnumber- Match by index (0, 1, -1, etc.)C['id']- Match by exact ID (with autocomplete for known IDs)ComponentGlobPattern- Match by glob pattern (e.g.,'ly.img.*')Partial<C>- Match by partial properties (e.g.,{ id: 'x', key: 'y' })(component, index) => boolean- Custom predicate function
Type Parameters#
| Type Parameter | Default type |
|---|---|
C extends OrderComponent | OrderComponent |