trxcllnt commented on code in PR #344:
URL: https://github.com/apache/arrow-js/pull/344#discussion_r2888123687
##########
src/row/struct.ts:
##########
@@ -50,7 +50,8 @@ export class StructRow<T extends TypeMap = any> {
const keys = parent.type.children;
const json = {} as { [P in string & keyof T]: T[P]['TValue'] };
for (let j = -1, n = keys.length; ++j < n;) {
- json[keys[j].name as string & keyof T] =
getVisitor.visit(parent.children[j], i);
+ const fieldName = keys[j].name as string & keyof T;
+ json[fieldName] = getVisitor.visit(parent.children[j], i);
Review Comment:
I don't think this addresses the issue in
https://github.com/apache/arrow-js/issues/95.
The diff of what this compiles down to is:
```diff
- json[keys[j].name] = getVisitor.visit(parent.children[j], i);
+ const fieldName = keys[j].name;
+ json[fieldName] = getVisitor.visit(parent.children[j], i);
```
And Closure/Terser will further collapse it back to the original form
because the functionality is identical.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]