mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
fix comments
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user