You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Divyanshu-s13 (via GitHub)" <gi...@apache.org> on 2026/02/02 19:12:50 UTC

[PR] fix(issue:#49): resolve TS2352 type error in MapBuilder for TypeScript 5.6+#49 [arrow-js]

Divyanshu-s13 opened a new pull request, #373:
URL: https://github.com/apache/arrow-js/pull/373

   What's Changed
   Fixed TS2352 type conversion error in MapBuilder.setValue() that occurs with TypeScript 5.6+ due to stricter type checking.
   
   Changes
   Updated type assertion in [map.ts] to use intermediate unknown cast (as unknown as MapValue<K, V>) to satisfy TypeScript 5.6+ stricter type narrowing
   Removed unnecessary type assertion on pending.get(index) since the type is already inferred correctly
   Why
   TypeScript 5.6 introduced stricter type conversion rules, causing TS2352 errors when directly casting between incompatible types. The as unknown as T pattern is the recommended approach for these scenarios.
   
   This is a non-breaking change - it only affects compile-time behavior and has no runtime impact.
   closes #49 
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(issue:#49): resolve TS2352 type error in MapBuilder for TypeScript 5.6+#49 [arrow-js]

Posted by "Divyanshu-s13 (via GitHub)" <gi...@apache.org>.
Divyanshu-s13 commented on PR #373:
URL: https://github.com/apache/arrow-js/pull/373#issuecomment-3837138717

   @kou  I’ve fixed the issue. Could you please merge it?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Resolve TS2352 type error in MapBuilder for TypeScript 5.6+ [arrow-js]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #373:
URL: https://github.com/apache/arrow-js/pull/373#issuecomment-3844579725

   I was waiting for reviews from Apache Arrow JS maintainers. Now, we have an approval. I merge this.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Resolve TS2352 type error in MapBuilder for TypeScript 5.6+ [arrow-js]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #373:
URL: https://github.com/apache/arrow-js/pull/373


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Resolve TS2352 type error in MapBuilder for TypeScript 5.6+ [arrow-js]

Posted by "Divyanshu-s13 (via GitHub)" <gi...@apache.org>.
Divyanshu-s13 commented on PR #373:
URL: https://github.com/apache/arrow-js/pull/373#issuecomment-3842694707

    Hi @kou ,
   
   Could you please let me know if any changes are required for this issue?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org