UNPKG

@ahoo-wang/fetcher-wow

Version:

Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher

33 lines 1.34 kB
/** * Interface for field projection. */ export interface Projection<FIELDS extends string = string> { include?: FIELDS[]; exclude?: FIELDS[]; } /** * Default projection configuration. * Empty projection object includes all fields. */ export declare const DEFAULT_PROJECTION: Projection; export declare function defaultProjection<FIELDS extends string = string>(): Projection<FIELDS>; /** * Creates a Projection object with the provided parameters. * * This function is a factory for creating Projection objects, which represent * field projection specifications for queries. It allows specifying which fields * to include or exclude in query results. * * @param options - The projection options. Defaults to DEFAULT_PROJECTION. * @param options.include - Array of field names to include in the projection. Optional. * @param options.exclude - Array of field names to exclude from the projection. Optional. * @returns A Projection object with the specified parameters */ export declare function projection<FIELDS extends string = string>({ include, exclude, }?: Projection<FIELDS>): Projection<FIELDS>; /** * Interface for objects that support field projection. */ export interface ProjectionCapable<FIELDS extends string = string> { projection?: Projection<FIELDS>; } //# sourceMappingURL=projection.d.ts.map