UNPKG

1.08 kBTypeScriptView Raw
1/// <reference types="koa-bodyparser" />
2import { Class, ParameterProperties, TypeConverter, ValueConverter, ParameterPropertiesType } from "@plumjs/core";
3import { FunctionReflection } from "@plumjs/reflect";
4import { Request } from "koa";
5export declare function flattenConverters(converters: TypeConverter[]): Map<Function, ValueConverter>;
6export declare function booleanConverter(rawValue: any, prop: ParameterProperties): boolean;
7export declare function numberConverter(rawValue: any, prop: ParameterProperties): number;
8export declare function dateConverter(rawValue: any, prop: ParameterProperties): Date;
9export declare function defaultModelConverter(value: any, prop: ParameterPropertiesType<Class>): any;
10export declare function defaultArrayConverter(value: any[], prop: ParameterPropertiesType<Class[]>): any;
11export declare const DefaultConverterList: TypeConverter[];
12export declare function convert(value: any, prop: ParameterProperties): any;
13export declare function bindParameter(request: Request, action: FunctionReflection, converter?: TypeConverter[]): any[];