@sugo/mongodb-queryparams
Version:
Unique Queryparams sintax (Inspired in Elastic Search) that creates queries for MongoDB
25 lines (24 loc) • 675 B
TypeScript
export interface IToken {
value: any;
[key: string]: any;
}
export interface ILexer {
reset: (chunk: string, info: any) => void;
next: () => IToken | undefined;
save: () => any;
formatError: (token: IToken) => string;
has: (tokenType: string) => boolean;
}
export interface INearleyRule {
name: string;
symbols: NearleySymbol[];
postprocess?: (d: any[], loc?: number, reject?: {}) => any;
}
export declare type NearleySymbol = string | {
literal: any;
} | {
test: (token: any) => boolean;
};
export declare let ILexer: ILexer | undefined;
export declare let ParserRules: INearleyRule[];
export declare let ParserStart: string;