@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
19 lines (18 loc) • 610 B
TypeScript
interface WithFilters {
filters?: string | string[];
}
/**
* Adds one or more filters to an object with a `filters` property. Appended
* filters are added to the end of the existing list.
*
* @typeParam T - Object to which filters will be append.
*
* @param objWithFilters - Object to append filters on the `filters` property.
* @param filters - One or more filters to append.
*
* @returns The object with the appended filters.
*/
export declare const appendFilters: <T extends WithFilters>(objWithFilters: T | undefined, filters: string | string[]) => T & {
filters: string[];
};
export {};