@golemio/pid
Version:
Golemio PID Module
23 lines (22 loc) • 956 B
TypeScript
/// <reference types="qs" />
import { ClassConstructor } from "@golemio/core/dist/shared/class-transformer";
import { ParsedQs } from "@golemio/core/dist/shared/qs";
export declare class RopidRouterUtils {
static TIMEZONE: string;
/**
* Convert plain object to DTO class instance
*/
static mapObjectToDTOInstance: <T>(dto: ClassConstructor<T>, data: any) => T;
/**
* Format to ISO 8601 (without milliseconds)
*/
static formatTimestamp: (dateObject: Date | null, preferredTimezone?: string) => string | null;
/**
* Validate and return timezone (it is possible to use _ symbol instead of URL encoded / symbol)
*/
static getPreferredTimezone: (preferredTimezone: ParsedQs[string]) => string;
/**
* Convert query parameter to array string | ParsedQs | (string | ParsedQs)[] | undefined
*/
static convertParamToArray: <T>(param: ParsedQs | T | (ParsedQs | T)[] | undefined) => T[];
}