fix comments

This commit is contained in:
Martin Probst
2018-08-28 10:35:16 +02:00
parent e618d752b6
commit e58ffcf509
2 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -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<true>) {
// 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) => {