Improve typing

This commit is contained in:
pietervdvn 2022-06-19 22:37:31 +02:00
parent da8cbd8c00
commit ee9646a176

View file

@ -18,10 +18,12 @@ export class UpdateLegacyLayer extends DesugaringStep<LayerConfigJson | string |
// Reuse of an already existing layer; return as-is
return {result: json, errors: [], warnings: []}
}
let config: any = {...json};
let config = {...json};
if (config["overpassTags"]) {
config.source = config.source ?? {}
config.source = config.source ?? {
osmTags: config["overpassTags"]
}
config.source.osmTags = config["overpassTags"]
delete config["overpassTags"]
}