UNPKG

angular-odata

Version:

Client side OData typescript library for Angular

40 lines (39 loc) 1.36 kB
import { Parser, ParserOptions } from '../../../types'; import { QueryCustomType } from '../builder'; import { Expression } from './base'; import { ODataFunctions, ODataOperators, Renderable } from './syntax'; export type ComputeExpressionBuilder<T> = { t: Required<T>; e: () => ComputeExpression<T>; }; export declare class ComputeExpression<T> extends Expression<T> { protected names: string[]; constructor({ children, names, }?: { children?: Renderable[]; names?: string[]; }); get [Symbol.toStringTag](): string; static factory<T>(opts: (builder: ComputeExpressionBuilder<T>, current?: ComputeExpression<T>) => ComputeExpression<T>, current?: ComputeExpression<T>): ComputeExpression<T>; toJson(): { $type: string; children: any[]; } & { names: string[]; }; static fromJson<T>(json: { [name: string]: any; }): ComputeExpression<T>; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser<T>; options?: ParserOptions; }): string; clone(): ComputeExpression<T>; private _add; field<T>(name: string, opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ComputeExpression<T>; }