forked from MapComplete/MapComplete
Studo: WIP
This commit is contained in:
parent
7ebb3d721c
commit
338599454c
30 changed files with 42794 additions and 749 deletions
|
|
@ -22,3 +22,22 @@ export interface ConfigMeta {
|
|||
required: boolean
|
||||
description: string
|
||||
}
|
||||
|
||||
export class ConfigMetaUtils {
|
||||
static isTranslation(configMeta: ConfigMeta) {
|
||||
/* {
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}*/
|
||||
if (!configMeta.type) {
|
||||
return false
|
||||
}
|
||||
if (Array.isArray(configMeta.type)) {
|
||||
return configMeta.type.some((t) => t["$ref"] === "#/definitions/Record<string,string>")
|
||||
} else {
|
||||
return configMeta.type["$ref"] === "#/definitions/Record<string,string>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue