UNPKG

ts-flex-query

Version:
13 lines (12 loc) 637 B
import { Expression } from '../../core/expression'; import { PipeOperator } from '../../core/pipe-operator'; import { DataType } from '../../types/data-type'; export declare class FieldOperator implements PipeOperator { readonly name: string; private readonly type; constructor(name: string, type?: DataType); instantiate(input: Expression): Expression<any>; private apply; private applyWithoutKnownType; } export declare function field<TIn, TField extends keyof NonNullable<TIn> & string>(name: TField): PipeOperator<TIn, undefined extends TIn ? NonNullable<TIn>[TField] | undefined : NonNullable<TIn>[TField]>;