reproject() function
Helper to reproject Design onto a different ModelInterface.
Signature:
declare function reproject(ctx: Context, { design, mapping, model, }: {
design: Design;
mapping?: Mapping;
model: ModelInterface | string;
}): Promise<Design>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
ctx | ||
|
{ design, mapping, model, } |
{ design: Design; mapping?: Mapping; model: ModelInterface | string; } |
Returns:
Promise<Design>
Remarks
Effectively maps a Design Document onto a target ModelInterface using a mapping definition.
A custom Mapping can be provided to the helper as the mapping parameter. If it's not provided the helper will attempt to lookup a predefined mapping between the two models from the API.