declare type Mapper = (raw: { [x: string]: any; }, user?: any, owner?: any) => T;