forked from MapComplete/MapComplete
docs: improve typings, add error message
This commit is contained in:
parent
ec2e0e1de1
commit
34a5b08536
2 changed files with 9 additions and 2 deletions
|
@ -303,8 +303,11 @@ export interface LayerConfigJson {
|
|||
*/
|
||||
tagRenderings?: (
|
||||
| string
|
||||
| { builtin: string | string[]; override: Partial<QuestionableTagRenderingConfigJson> }
|
||||
| { id: string; builtin: string[]; override: Partial<QuestionableTagRenderingConfigJson> }
|
||||
| {
|
||||
id?: string
|
||||
builtin: string | string[]
|
||||
override: Partial<QuestionableTagRenderingConfigJson>
|
||||
}
|
||||
| QuestionableTagRenderingConfigJson
|
||||
| (RewritableConfigJson<
|
||||
(
|
||||
|
|
|
@ -335,6 +335,10 @@ export default class TagRenderingConfig {
|
|||
if (allKeys.length > 1 && !allHaveIfNot) {
|
||||
throw `${context}: A multi-answer is defined, which generates values over multiple keys. Please define ifnot-tags too on every mapping`
|
||||
}
|
||||
|
||||
if (allKeys.length > 1 && this.freeform?.key !== undefined) {
|
||||
throw `${context}: A multi-answer is defined, which generates values over multiple keys. This is incompatible with having a freeform key`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue