grafana/public/app/core/utils/model_utils.ts
Tobias Skarhed 83da3660da
Chore: noImplictAny no errors left (#18303)
* Add types and rewrite datasourceChanged to async/await
2019-08-01 14:38:34 +02:00

10 lines
286 B
TypeScript

export function assignModelProperties(target: any, source: any, defaults: any, removeDefaults?: undefined) {
for (const key in defaults) {
if (!defaults.hasOwnProperty(key)) {
continue;
}
target[key] = source[key] === undefined ? defaults[key] : source[key];
}
}