chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-01-18 00:30:06 +01:00
parent d7509c8d6f
commit 66c27cbad4
127 changed files with 6557 additions and 2698 deletions

View file

@ -99,7 +99,7 @@ export default class ThemeConfig implements ThemeInformation {
options?: {
definedAtUrl?: string
definitionRaw?: string
},
}
) {
if (json === undefined) {
throw "Cannot construct a layout config, the parameter 'json' is undefined"
@ -130,7 +130,7 @@ export default class ThemeConfig implements ThemeInformation {
throw `The title of a theme should always be a translation, as it sets the corresponding languages (${context}.title). The themenID is ${
this.id
}; the offending object is ${JSON.stringify(
json.title,
json.title
)} which is a ${typeof json.title})`
}
if (this.language.length == 0) {
@ -184,8 +184,8 @@ export default class ThemeConfig implements ThemeInformation {
<LayerConfigJson>lyrJson,
json.id + ".layers." + lyrJson["id"],
official,
<LayerConfigJson[]>json.layers,
),
<LayerConfigJson[]>json.layers
)
)
this.extraLink = new ExtraLinkConfig(
@ -195,7 +195,7 @@ export default class ThemeConfig implements ThemeInformation {
newTab: true,
requirements: ["iframe", "no-welcome-message"],
},
context + ".extraLink",
context + ".extraLink"
)
this.hideFromOverview = json.hideFromOverview ?? false
@ -301,7 +301,7 @@ export default class ThemeConfig implements ThemeInformation {
return false
}
return o instanceof Translation
},
}
)
return { untranslated, total }
@ -309,7 +309,7 @@ export default class ThemeConfig implements ThemeInformation {
public getMatchingLayer(
tags: Record<string, string>,
blacklistLayers?: Set<string>,
blacklistLayers?: Set<string>
): LayerConfig | undefined {
if (tags === undefined) {
return undefined
@ -338,7 +338,7 @@ export default class ThemeConfig implements ThemeInformation {
"Fallthrough: could not find the appropriate layer for an object with tags",
tags,
"within layout",
this,
this
)
return undefined
}