mapcomplete/Logic/Tags/TagsFilter.ts

23 lines
682 B
TypeScript
Raw Permalink Normal View History

2021-03-22 02:05:08 +00:00
export abstract class TagsFilter {
abstract asOverpass(): string[]
abstract isUsableAsAnswer(): boolean;
abstract isEquivalent(other: TagsFilter): boolean;
abstract matchesProperties(properties: any): boolean;
abstract asHumanString(linkToWiki: boolean, shorten: boolean, properties: any);
2021-03-22 02:05:08 +00:00
abstract usedKeys(): string[];
2021-04-19 16:17:26 +00:00
/**
* Converts the tagsFilter into a list of key-values that should be uploaded to OSM.
* Throws an error if not applicable.
*
* Note: properties are the already existing tags-object. It is only used in the substituting tag
*/
abstract asChange(properties:any): {k: string, v:string}[]
2021-03-22 02:05:08 +00:00
}