Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(rawData: IRawModel|IRecord = { }, collection?: PureCollection) {
let data = rawData;
if ((rawData && 'type' in rawData) && ('attributes' in rawData || 'relationships' in rawData)) {
const classRefs = getModelClassRefs(BaseClass);
data = flattenModel(classRefs, rawData as IRecord);
}
super(data, collection);
}