@player-ui/player
Version:
29 lines • 1.31 kB
TypeScript
import { SyncBailHook, SyncWaterfallHook } from "tapable-ts";
import type { AnyNode } from "../binding-grammar/index";
import type { BindingParserOptions, BindingLike } from "./binding";
import { BindingInstance } from "./binding";
import type { NormalizedResult, ResolveBindingASTOptions } from "./resolver";
export * from "./utils";
export * from "./binding";
export declare const SIMPLE_BINDING_REGEX: RegExp;
export declare const BINDING_BRACKETS_REGEX: RegExp;
type BeforeResolveNodeContext = Required<NormalizedResult> & ResolveBindingASTOptions;
/** A parser for creating bindings from a string */
export declare class BindingParser {
private cache;
private parseCache;
private parserOptions;
hooks: {
skipOptimization: SyncBailHook<[string], boolean, Record<string, any>>;
beforeResolveNode: SyncWaterfallHook<[AnyNode, BeforeResolveNodeContext], Record<string, any>>;
};
constructor(options?: Partial<BindingParserOptions>);
/**
* Takes a binding path, parses it, and returns an equivalent, normalized
* representation of that path.
*/
private normalizePath;
private getBindingForNormalizedResult;
parse(rawBinding: BindingLike, overrides?: Partial<BindingParserOptions>): BindingInstance;
}
//# sourceMappingURL=index.d.ts.map