Chore: cleanup typings and linting errors

This commit is contained in:
Pieter Vander Vennet 2025-04-17 02:25:51 +02:00
parent 15cbadc4e0
commit fffc959c0d
6 changed files with 21 additions and 41 deletions

View file

@ -9,7 +9,8 @@ import FilteredLayer from "../../../Models/FilteredLayer"
import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"
import { LayerConfigJson } from "../../../Models/ThemeConfig/Json/LayerConfigJson"
import conflation_json from "../../../../assets/layers/conflation/conflation.json"
import ThemeViewState from "../../../Models/ThemeViewState"
import { SpecialVisualizationState } from "../../SpecialVisualization"
import { OsmTags } from "../../../Models/OsmFeature"
export interface ImportFlowArguments {
readonly text: string
@ -65,7 +66,7 @@ ${Utils.special_visualizations_importRequirementDocs}
* Given the tagsstore of the point which represents the challenge, creates a new store with tags that should be applied onto the newly created point,
*/
public static getTagsToApply(
originalFeatureTags: UIEventSource<any>,
originalFeatureTags: UIEventSource<OsmTags>,
args: { tags: string }
): Store<Tag[]> {
if (originalFeatureTags === undefined) {
@ -109,9 +110,7 @@ ${Utils.special_visualizations_importRequirementDocs}
* Others (e.g.: snapOnto-layers) are not to be handled here
*/
public static getLayerDependencies(argsRaw: string[], argSpec?): string[] {
const args: ImportFlowArguments = <any>(
Utils.ParseVisArgs(argSpec ?? ImportFlowUtils.generalArguments, argsRaw)
)
const args = Utils.ParseVisArgs<ImportFlowArguments>(argSpec ?? ImportFlowUtils.generalArguments, argsRaw)
return args.targetLayer.split(" ")
}
@ -139,14 +138,14 @@ ${Utils.special_visualizations_importRequirementDocs}
* This class works together closely with ImportFlow.svelte
*/
export default abstract class ImportFlow<ArgT extends ImportFlowArguments> {
public readonly state: ThemeViewState
public readonly state: SpecialVisualizationState
public readonly args: ArgT
public readonly targetLayer: FilteredLayer[]
public readonly tagsToApply: Store<Tag[]>
protected readonly _originalFeatureTags: UIEventSource<Record<string, string>>
constructor(
state: ThemeViewState,
state: SpecialVisualizationState,
args: ArgT,
tagsToApply: Store<Tag[]>,
originalTags: UIEventSource<Record<string, string>>

View file

@ -137,7 +137,6 @@
}
unseenFreeformValues.splice(index, 1)
}
// TODO this has _to much_ values
freeformInput.set(unseenFreeformValues.join(";"))
if (checkedMappings.length + 1 < mappings.length) {
checkedMappings.push(unseenFreeformValues.length > 0)