UNPKG

@vladbasin/strong-api-mapping

Version:

Strongly typed API models. Mapping & validation

4 lines (3 loc) 243 B
import { ObjectSchema } from 'joi'; import { Newable, RawApiResponseType } from './types'; export declare const mapRawApiResponseToPayload: <T>(rawApiResponse: RawApiResponseType, PayloadConstructor: Newable<T>, schema: ObjectSchema<T>) => T;