forked from MapComplete/MapComplete
TYpes: better type 'On'
This commit is contained in:
parent
f5888dee56
commit
cb0cb710a9
3 changed files with 11 additions and 10 deletions
|
|
@ -901,12 +901,12 @@ export class ValidateLayer extends Conversion<
|
|||
}
|
||||
}
|
||||
|
||||
export class ValidateFilter extends DesugaringStep<FilterConfigJson> {
|
||||
export class ValidateFilter extends DesugaringStep<string | FilterConfigJson> {
|
||||
constructor() {
|
||||
super("ValidateFilter", "Detect common errors in the filters")
|
||||
}
|
||||
|
||||
convert(filter: FilterConfigJson, context: ConversionContext): FilterConfigJson {
|
||||
convert(filter: string | FilterConfigJson, context: ConversionContext): string | FilterConfigJson {
|
||||
if (typeof filter === "string") {
|
||||
// Calling another filter, we skip
|
||||
return filter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue