mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
83da3660da
* Add types and rewrite datasourceChanged to async/await
10 lines
286 B
TypeScript
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];
|
|
}
|
|
}
|