Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
21 lines
708 B
Plaintext
21 lines
708 B
Plaintext
import { DecisionTreeNode, ValueContainer } from './Ast';
|
|
/**
|
|
* A function that turn a decision tree into a usable form.
|
|
*
|
|
* @typeParam V - the type of associated value.
|
|
*
|
|
* @typeParam R - return type for this builder
|
|
* (Consider using {@link Picker}.)
|
|
*/
|
|
export declare type BuilderFunction<V, R> = (nodes: DecisionTreeNode<V>[]) => R;
|
|
/**
|
|
* Recommended matcher function shape to implement
|
|
* in builders.
|
|
*
|
|
* The elements stack is represented as the arguments array.
|
|
*
|
|
* @typeParam L - the type of elements in a particular DOM AST.
|
|
* @typeParam V - the type of associated value.
|
|
*/
|
|
export declare type MatcherFunction<L, V> = (el: L, ...tail: L[]) => ValueContainer<V>[];
|