react-dsl-editor 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -62,11 +62,18 @@ export declare const eof: GrammarNode<never>;
62
62
 
63
63
  export declare function error<T extends string>(param: ParserError<T>): ParserError<T>;
64
64
 
65
+ export declare function extractAll<T extends string>(parserResult: ParserSuccess<T>, type: T): string[];
66
+
67
+ export declare function extractFirst<T extends string>(result: ParserSuccess<T>, name: T): string | undefined;
68
+
65
69
  export declare type FaultToleranceMode = 'skip-parser' | 'skip-input' | 'fuzzy-match' | 'partial-match';
66
70
 
67
71
  export declare interface GrammarNode<T extends string = never> {
68
72
  type: T;
69
- suggestions(): string[];
73
+ suggestions(): {
74
+ text: string;
75
+ node: GrammarNode<T>;
76
+ }[];
70
77
  parse(text: string, context: ParserContext<T>): ParserResult<T>;
71
78
  children: GrammarNode<T>[];
72
79
  meta?: Record<string, unknown>;