Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const {
annotationData = {},
datasource = {},
formData = {} as FormDataType,
hooks = {},
initialValues = [],
queryData = [],
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
} = config;
this.width = width;
this.height = height;
this.annotationData = annotationData;
this.datasource = convertKeysToCamelCase(datasource);
this.rawDatasource = datasource;
this.formData = convertKeysToCamelCase(formData);
this.rawFormData = formData;
this.hooks = hooks;
this.initialValues = initialValues;
this.queryData = queryData;
}
}
constructor(config: ChartPropsConfig = {}) {
const {
annotationData = {},
datasource = {},
formData = {} as FormDataType,
hooks = {},
initialValues = [],
queryData = [],
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
} = config;
this.width = width;
this.height = height;
this.annotationData = annotationData;
this.datasource = convertKeysToCamelCase(datasource);
this.rawDatasource = datasource;
this.formData = convertKeysToCamelCase(formData);
this.rawFormData = formData;
this.hooks = hooks;
this.initialValues = initialValues;
this.queryData = queryData;
}
}