import type { Background, Envelope, Examples, Feature, GherkinDocument, Location, Pickle, Rule, Scenario, Source, Step } from '@cucumber/messages'; export default class Query { private readonly sources; private readonly sourceByUri; private readonly gherkinDocuments; private readonly pickles; private readonly locationByAstNodeId; private readonly gherkinStepByAstNodeId; private readonly pickleIdsMapByUri; private readonly pickleIdsByAstNodeId; private readonly pickleStepIdsByAstNodeId; private readonly featureByUriLine; private readonly backgroundByUriLine; private readonly ruleByUriLine; private readonly scenarioByUriLine; private readonly examplesByUriLine; private readonly stepByUriLine; /** * Gets the location (line and column) of an AST node. * @param astNodeId */ getLocation(astNodeId: string): Location; getSources(): readonly Source[]; getGherkinDocuments(): readonly GherkinDocument[]; getPickles(): readonly Pickle[]; getSource(uri: string): Source | undefined; getFeature(uri: string, line: number): Feature | undefined; getBackground(uri: string, line: number): Background | undefined; getRule(uri: string, line: number): Rule | undefined; getScenario(uri: string, line: number): Scenario | undefined; getExamples(uri: string, line: number): Examples | undefined; getStep(uri: string, line: number): Step | undefined; /** * Gets all the pickle IDs * @param uri - the URI of the document * @param astNodeId - optionally restrict results to a particular AST node */ getPickleIds(uri: string, astNodeId?: string): readonly string[]; getPickleStepIds(astNodeId: string): readonly string[]; update(message: Envelope): Query; private updateGherkinFeature; private updateGherkinBackground; private updateGherkinRule; private updateGherkinScenario; private updateGherkinExamples; private updateGherkinStep; private updatePickle; private updatePickleSteps; }