SearchPropertyMatcher
Unofficial
The matcher of the [key] and [key: value] property operators.
Import:
import type { SearchPropertyMatcher } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface SearchPropertyMatcher extends SearchMatcherExtends: SearchMatcher
Constructor
new SearchPropertyMatcher(key: SearchMatcher, value: SearchMatcher | null)Constructor.
Properties
| Property | Type | Description | |
|---|---|---|---|
| key | SearchMatcher | The matcher the property name is matched with. | |
| matchedTokens | unknown[] | The query tokens this matcher consumed while the query was parsed. (Inherited from SearchMatcher) | |
| value | null | SearchMatcher | The matcher each property value is matched with, or null for a bare [key] query. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| eatToken(state) | void | Consumes the parser's current token, recording it in SearchMatcher.matchedTokens. (Inherited from SearchMatcher) | |
| getContext(offset) | null | SearchMatcherTokenContext | Finds the matcher that owns the query token at a cursor offset. (Inherited from SearchMatcher) | |
| getInfo() | string | Describes this matcher, as shown by the search view's "Explain search term". (Inherited from SearchMatcher) | |
| match(context) | null | SearchMatchResult | undefined | Matches the context's top-level frontmatter properties. Every property whose name SearchPropertyMatcher.key matches is reported. With a SearchPropertyMatcher.value, each scalar value, or each item of an array value, is matched against it through SearchMatchContext.cloneForPropertyContent. | |
| requiredInputs() | SearchRequiredInputs | The inputs this matcher needs to evaluate a file. (Inherited from SearchMatcher) |