@plurid/plurid-engine
Version:
Plurid Engine and Utility Functions
32 lines (31 loc) • 899 B
TypeScript
import { Indexed, PluridRoute, PluridRouteFragments } from '@plurid/plurid-data';
export declare type ParserPartialOptions = Partial<ParserOptions>;
export interface ParserOptions {
/**
* Allow the parsing of fragments. Default `true`.
*/
fragment: boolean;
}
export interface ParserResponse<C> {
path: PluridRoute<C>;
pathname: string;
elements: string[];
match: boolean;
parameters: Indexed<string>;
query: Indexed<string>;
fragments: PluridRouteFragments;
route: string;
}
export interface MatcherResponse<C> {
path: PluridRoute<C>;
pathname: string;
parameters: Record<string, string>;
query: Record<string, string>;
fragments: PluridRouteFragments;
route: string;
}
export interface ParserParametersAndMatch {
match: boolean;
parameters: Indexed<string>;
elements: string[];
}