UNPKG

968 BTypeScriptView Raw
1import { SchemaObjectMetadata } from '../interfaces/schema-object-metadata.interface';
2import { SwaggerEnumType } from '../types/swagger-enum.type';
3export declare function getEnumValues(enumType: SwaggerEnumType): string[] | number[];
4export declare function getEnumType(values: (string | number)[]): 'string' | 'number';
5export declare function addEnumArraySchema(paramDefinition: Partial<Record<'schema' | 'isArray' | 'enumName', any>>, decoratorOptions: Partial<Record<'enum' | 'enumName', any>>): void;
6export declare function addEnumSchema(paramDefinition: Partial<Record<string, any>>, decoratorOptions: Partial<Record<string, any>>): void;
7export declare const isEnumArray: <T extends Partial<Record<"enum" | "isArray", any>>>(obj: Record<string, any>) => obj is T;
8export declare const isEnumDefined: <T extends Partial<Record<"enum", any>>>(obj: Record<string, any>) => obj is T;
9export declare const isEnumMetadata: (metadata: SchemaObjectMetadata) => any;