angular-odata
Version:
Client side OData typescript library for Angular
59 lines (58 loc) • 1.95 kB
TypeScript
import { Parser, ParserOptions } from '../../../types';
import { QueryCustomType } from '../builder';
import { Expression } from './base';
import { FilterExpression, FilterExpressionBuilder } from './filter';
import { Renderable } from './syntax';
export declare class CountField<T> implements Renderable {
protected field: any;
private values;
constructor(field: any, values?: {
[name: string]: any;
});
get [Symbol.toStringTag](): string;
toJson(): {
field: any;
};
render({ aliases, escape, prefix, parser, options, }: {
aliases?: QueryCustomType[];
escape?: boolean;
prefix?: string;
parser?: Parser<T>;
options?: ParserOptions;
}): string;
filter(opts: (builder: FilterExpressionBuilder<T>, current?: FilterExpression<T>) => FilterExpression<T>): any;
clone(): CountField<T>;
resolve(parser: any): any;
private option;
}
export type CountExpressionBuilder<T> = {
t: Required<T>;
e: () => CountExpression<T>;
};
export declare class CountExpression<T> extends Expression<T> {
constructor({ children, }?: {
children?: Renderable[];
});
get [Symbol.toStringTag](): string;
static factory<T>(opts: (builder: CountExpressionBuilder<T>, current?: CountExpression<T>) => CountExpression<T>, current?: CountExpression<T>): CountExpression<T>;
private _add;
toJson(): {
$type: string;
children: any[];
};
static fromJson<T>(json: {
[name: string]: any;
}): CountExpression<T>;
render({ aliases, escape, prefix, parser, options, }?: {
aliases?: QueryCustomType[];
escape?: boolean;
prefix?: string;
parser?: Parser<T>;
options?: ParserOptions;
}): string;
clone(): CountExpression<T>;
field<F>(field: F[], opts?: (e: {
t: F;
f: CountField<F>;
}) => CountExpression<F>): CountExpression<F>;
}