fix(transformer): correct code comments (#7247)

Follow-on after #7199. Just correct typos in a couple of comments.
This commit is contained in:
overlookmotel 2024-11-12 11:09:22 +00:00
parent 20fe3cd6e7
commit c5f4ee7a82
2 changed files with 2 additions and 2 deletions

View file

@ -483,7 +483,7 @@ impl<'a> ArrowFunctionConverter<'a> {
match ancestor {
// `class A { async foo() {} }`
Ancestor::MethodDefinitionValue(_) => true,
// Only `({ async foo() {} })` does not include non-method like `({ async foo: function() {} })`,
// Only `({ async foo() {} })` does not include non-method like `({ foo: async function() {} })`,
// because it's just a property with a function value
Ancestor::ObjectPropertyValue(property) => *property.method(),
_ => false,

View file

@ -755,7 +755,7 @@ impl<'a, 'ctx> AsyncGeneratorExecutor<'a, 'ctx> {
match ancestor {
// `class A { async foo() {} }`
Ancestor::MethodDefinitionValue(_) => true,
// Only `({ async foo() {} })` does not include non-method like `({ async foo: function() {} })`,
// Only `({ async foo() {} })` does not include non-method like `({ foo: async function() {} })`,
// because it's just a property with a function value
Ancestor::ObjectPropertyValue(property) => *property.method(),
_ => false,