Fix bug: override preserves null's again

This commit is contained in:
Pieter Vander Vennet 2022-04-13 00:31:13 +02:00
parent 2f4ccae39e
commit b43d976058
6 changed files with 205 additions and 87 deletions

View file

@ -158,6 +158,20 @@ export class On<P, T> extends DesugaringStep<T> {
}
}
export class Pass<T> extends Conversion<T, T> {
constructor(message?: string) {
super(message??"Does nothing, often to swap out steps in testing", [], "Pass");
}
convert(json: T, context: string): { result: T; errors?: string[]; warnings?: string[]; information?: string[] } {
return {
result: json
};
}
}
export class Concat<X, T> extends Conversion<X[], T[]> {
private readonly _step: Conversion<X, T[]>;