@creamapi/cream
Version:
Concise REST API Maker - An extension library for express to create REST APIs faster
20 lines (19 loc) • 726 B
TypeScript
import { CookieOptions } from './Cookie';
export declare const HTTP_DYNAMIC_COOKIES: unique symbol;
/**
* @internal
* this type is used to map a property of a class to a cookie with its relative options
*/
export type DynamicCookieMapping = {
propertyName: string;
cookieName: string;
opts: CookieOptions;
};
/**
* This method is used to map an attribute of a class to a specific cookie
* given the cookie options
* @param cookieName the cookie name
* @param opts the options associated with the cookie
* @returns the decorator function that will decorate the class attribute
*/
export declare function DynamicCookie(cookieName: string, opts?: CookieOptions): (target: any, propertyName: string) => void;