diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 21e9af92604..93ddf21024d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16213,7 +16213,7 @@ namespace ts { // } // ... // - // Creating an object that has getter and setters instead of just an accessor funtion is required for destructuring assignments + // Creating an object that has getter and setters instead of just an accessor function is required for destructuring assignments // as a call expression cannot be used as the target of a destructuring assignment while a property access can. // // For element access expressions (`super[x]`), we emit a generic helper that forwards the element access in both situations. diff --git a/src/compiler/transformers/es2017.ts b/src/compiler/transformers/es2017.ts index 64a126a63c8..b509c6dd003 100644 --- a/src/compiler/transformers/es2017.ts +++ b/src/compiler/transformers/es2017.ts @@ -667,10 +667,10 @@ namespace ts { } } - /** Creates a variable named `_superProps` with accessor properties for the given property names. */ + /** Creates a variable named `_super` with accessor properties for the given property names. */ export function createSuperAccessVariableStatement(resolver: EmitResolver, node: FunctionLikeDeclaration, names: UnderscoreEscapedMap) { // Create a variable declaration with a getter/setter (if binding) definition for each name: - // const _superProps = Object.create(null, { x: { get: () => super.x, set: (v) => super.x = v }, ... }); + // const _super = Object.create(null, { x: { get: () => super.x, set: (v) => super.x = v }, ... }); const hasBinding = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuperBinding) !== 0; const accessors: PropertyAssignment[] = []; names.forEach((_, key) => {