/** * The five reactive declarations — `state`, `computed`, `resource`, `action` * and `watch` — read after their head has already been claimed. * * Each is a module-level statement and a component item both, so the dispatcher * in `parser.ts` and `parseComponent` call the same five readers. */ import { type Parameter, type Statement, type Token, type TokenKind, type TypeReference } from "@velarscript/compiler/extension"; import { type WebActionDeclaration as ActionDeclaration, type WebComputedDeclaration as ComputedDeclaration, type WebResourceDeclaration as ResourceDeclaration, type WebStateDeclaration as StateDeclaration, type WebWatchDeclaration as WatchDeclaration } from "../../ast.ts"; import type { Expression } from "@velarscript/compiler/extension"; export interface ReactiveParserHost { expect(kind: TokenKind, message: string): Token; match(kind: TokenKind): boolean; matchWord(value: string): boolean; parseBlock(): readonly Statement[]; parseExpression(minimumPrecedence?: number): Expression; parseParameters(): readonly Parameter[]; parseTypeReference(allowTrailingOptional?: boolean): TypeReference; previous(): Token; } export declare function parseStateDeclaration(host: ReactiveParserHost, start: number, exported: boolean): StateDeclaration; /** * D71 rule 182: `computed` parses exactly where `state` parses, through the * same shape lookahead — the two halves of the reactive row differ in what * they mean, not in how they are written. */ export declare function parseComputedDeclaration(host: ReactiveParserHost, start: number, exported: boolean): ComputedDeclaration; export declare function parseResourceDeclaration(host: ReactiveParserHost, start: number, exported: boolean): ResourceDeclaration; export declare function parseActionDeclaration(host: ReactiveParserHost, start: number, exported: boolean): ActionDeclaration; export declare function parseWatchDeclaration(host: ReactiveParserHost, start: number): WatchDeclaration; //# sourceMappingURL=reactive.d.ts.map