mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +00:00
Remove some type casts
Change-type: patch
This commit is contained in:
parent
c66e1aab9d
commit
235f9f04af
@ -494,7 +494,5 @@ export function normalizeLabels(labels: {
|
||||
labels,
|
||||
(_v, k) => !(_.startsWith(k, 'io.balena.') || _.startsWith(k, 'io.resin.')),
|
||||
);
|
||||
return _.assign({}, otherLabels, legacyLabels, balenaLabels) as {
|
||||
[key: string]: string;
|
||||
};
|
||||
return _.assign({}, otherLabels, legacyLabels, balenaLabels);
|
||||
}
|
||||
|
@ -130,7 +130,13 @@ export class RPiConfigBackend extends DeviceConfigBackend {
|
||||
if (conf[key] == null) {
|
||||
conf[key] = [];
|
||||
}
|
||||
(conf[key] as string[]).push(value);
|
||||
const confArr = conf[key];
|
||||
if (!_.isArray(confArr)) {
|
||||
throw new Error(
|
||||
`Expected '${key}' to have a config array but got ${typeof confArr}`,
|
||||
);
|
||||
}
|
||||
confArr.push(value);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user