Skip to content

Commit e58ffcf

Browse files
committed
fix comments
1 parent e618d75 commit e58ffcf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16213,7 +16213,7 @@ namespace ts {
1621316213
// }
1621416214
// ...
1621516215
//
16216-
// Creating an object that has getter and setters instead of just an accessor funtion is required for destructuring assignments
16216+
// Creating an object that has getter and setters instead of just an accessor function is required for destructuring assignments
1621716217
// as a call expression cannot be used as the target of a destructuring assignment while a property access can.
1621816218
//
1621916219
// For element access expressions (`super[x]`), we emit a generic helper that forwards the element access in both situations.

src/compiler/transformers/es2017.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@ namespace ts {
667667
}
668668
}
669669

670-
/** Creates a variable named `_superProps` with accessor properties for the given property names. */
670+
/** Creates a variable named `_super` with accessor properties for the given property names. */
671671
export function createSuperAccessVariableStatement(resolver: EmitResolver, node: FunctionLikeDeclaration, names: UnderscoreEscapedMap<true>) {
672672
// Create a variable declaration with a getter/setter (if binding) definition for each name:
673-
// const _superProps = Object.create(null, { x: { get: () => super.x, set: (v) => super.x = v }, ... });
673+
// const _super = Object.create(null, { x: { get: () => super.x, set: (v) => super.x = v }, ... });
674674
const hasBinding = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuperBinding) !== 0;
675675
const accessors: PropertyAssignment[] = [];
676676
names.forEach((_, key) => {

0 commit comments

Comments
 (0)