error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.


!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== contextualExpressionTypecheckingDoesntBlowStack.ts (0 errors) ====
    // repro for: https://github.com/Microsoft/TypeScript/issues/23661
    export interface IValidationError {
        message: string;
    }
    
    export default class Operation {
        validateParameters(parameterValues: any) : IValidationError[] | null {
            let result: IValidationError[] | null = null;
            for(const parameterLocation of Object.keys(parameterValues)) {
                const parameter: any = (this as any).getParameter();;
                const values = (this as any).getValues();
    
                const innerResult = parameter.validate(values[parameter.oaParameter.name]);
                if(innerResult && innerResult.length > 0) {
                    // Commenting out this line will fix the problem.
                    result = (result || []).concat(innerResult);
                }
            }
    
            return result;
        }
    }