UNPKG

json-api-nestjs

Version:
11 lines (10 loc) 877 B
import { TypeField } from '../types'; export declare const nonEmptyObject: () => <T>(object: T) => boolean; export declare const uniqueArray: () => (e: string[]) => boolean; export declare const getValidationErrorForStrict: (props: string[], name: "Fields" | "Filter") => string; export declare const oneOf: (keys: string[]) => (val: any) => boolean; export declare const stringLongerThan: (length?: number) => (str: string) => boolean; export declare const arrayItemStringLongerThan: (length?: number) => (array: [string | null, ...(string | null)[]]) => boolean; export declare const stringMustBe: (type?: TypeField) => (inputString: string | null) => boolean; export declare const elementOfArrayMustBe: (type?: TypeField) => (inputArray: unknown[]) => boolean; export declare function guardIsKeyOfObject<R>(object: R, key: string | number | symbol): asserts key is keyof R;