digjoy
Version:
Simple Typescript decorators for express routing with joi validation
12 lines (11 loc) • 1.55 kB
TypeScript
import { ObjectSchema } from 'joi';
import 'reflect-metadata';
export declare const GET: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const PATCH: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const POST: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const PUT: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const OPTIONS: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const CONNECT: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const TRACE: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const HEAD: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare const DELETE: (path: string, schema?: ObjectSchema<any> | undefined) => (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void;