@creamapi/cream
Version:
Concise REST API Maker - An extension library for express to create REST APIs faster
11 lines (10 loc) • 521 B
TypeScript
import { Constructable } from '../Utils/Constructable';
export declare const HTTP_CODE_METADATA_KEY: unique symbol;
/**
* This decorator is used to decorate a class to add information about
* the return code that should be sent to the user when the target is serialized
* or in general returned from an ExpressCall
* @param code the code that should be returned to the user
* @returns the decorator of the function
*/
export declare function HttpReturnCode<T extends Constructable>(code: number): (target: T) => T;