viewModelFactory

Source
import { viewModelFactory } from "@prestojs/viewmodel";
viewModelFactory<FieldMappingType,PkFieldNameT>(fields,options)

Arguments:

ArgumentTypeDescription
*fieldsFieldMappingType
*
options
An object with the properties below
options.baseClassClass
*options.pkFieldNamestring|string[]
Returns:ViewModelClass