speech_rule_context.d.ts 829 B

123456789101112131415161718
  1. import { Span, SpanAttrs } from '../audio/span.js';
  2. import * as srf from './speech_rule_functions.js';
  3. export declare class SpeechRuleContext {
  4. customQueries: srf.CustomQueries;
  5. customStrings: srf.CustomStrings;
  6. contextFunctions: srf.ContextFunctions;
  7. customGenerators: srf.CustomGenerators;
  8. applyCustomQuery(node: Element, funcName: string): Element[];
  9. applySelector(node: Element, expr: string): Element[];
  10. applyQuery(node: Element, expr: string): Element;
  11. applyConstraint(node: Element, expr: string): boolean;
  12. constructString(node: Element, expr: string): string;
  13. constructSpan(node: Element, expr: string, def: SpanAttrs): Span[];
  14. private constructString_;
  15. parse(functions: [string, srf.SpeechRuleFunction][] | {
  16. [key: string]: srf.SpeechRuleFunction;
  17. }): void;
  18. }