refactor(compiler-cli): ensure compatibility with noImplicitOverride (#42512)

Adds the `override` keyword to the `compiler-cli` sources to ensure
compatibility with `noImplicitOverride`.

PR Close #42512
This commit is contained in:
Paul Gschwendtner
2021-06-07 17:25:45 +02:00
committed by Andrew Kushnir
parent 96c93260a2
commit ccbb913f4b
31 changed files with 117 additions and 110 deletions
@@ -30,7 +30,7 @@ export class IifeEmitScope<TStatement, TExpression> extends EmitScope<TStatement
* Wraps the output from `EmitScope.translateDefinition()` and `EmitScope.getConstantStatements()`
* in an IIFE.
*/
translateDefinition(definition: o.Expression): TExpression {
override translateDefinition(definition: o.Expression): TExpression {
const constantStatements = super.getConstantStatements();
const returnStatement =
@@ -44,7 +44,7 @@ export class IifeEmitScope<TStatement, TExpression> extends EmitScope<TStatement
* It is not valid to call this method, since there will be no shared constant statements - they
* are already emitted in the IIFE alongside the translated definition.
*/
getConstantStatements(): TStatement[] {
override getConstantStatements(): TStatement[] {
throw new Error('BUG - IifeEmitScope should not expose any constant statements');
}
}