refactor(web): move CaptureQuantifier definition

This commit is contained in:
Amaan Qureshi 2025-01-22 04:23:18 -05:00
parent 58662417a6
commit e3ac504e86
3 changed files with 24 additions and 24 deletions

View file

@ -104,18 +104,6 @@ export interface QueryCapture {
refutedProperties?: QueryProperties;
}
/** A quantifier for captures */
export const CaptureQuantifier = {
Zero: 0,
ZeroOrOne: 1,
ZeroOrMore: 2,
One: 3,
OneOrMore: 4
} as const;
/** A quantifier for captures */
export type CaptureQuantifier = typeof CaptureQuantifier[keyof typeof CaptureQuantifier];
/** A match of a {@link Query} to a particular set of {@link Node}s. */
export interface QueryMatch {
/** The index of the pattern that matched. */
@ -134,6 +122,18 @@ export interface QueryMatch {
refutedProperties?: QueryProperties;
}
/** A quantifier for captures */
export const CaptureQuantifier = {
Zero: 0,
ZeroOrOne: 1,
ZeroOrMore: 2,
One: 3,
OneOrMore: 4
} as const;
/** A quantifier for captures */
export type CaptureQuantifier = typeof CaptureQuantifier[keyof typeof CaptureQuantifier];
/**
* Predicates are represented as a single array of steps. There are two
* types of steps, which correspond to the two legal values for