You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/05 04:04:13 UTC

[GitHub] [arrow] hzuo commented on issue #12663: [TS] Typescript compatibility

hzuo commented on issue #12663:
URL: https://github.com/apache/arrow/issues/12663#issuecomment-1088244575

   The errors you're seeing are due to the fact that your tsconfig is different than the one used by this project.
   
   It looks like your tsconfig has [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) turned on, which adds a `| undefined` to every index access.
   
   One way to fix this is to have a tsconfig that is strictly looser than the one used in this repo.
   
   However, almost always that isn't the right solution - you don't in fact want your `tsc` to compile the TypeScript of your dependencies. Rather your dependencies should publish pre-compiled *.js and *.d.ts files and your tsc should leave them untouched (other than checking that your code is compatible with the *.d.ts declarations).
   
   That's exactly what `apache-arrow@7.0.0`, `@apache-arrow/es2015-esm@7.0.0`, etc. already do, so you should use those! `@apache-arrow/ts` should probably not be published.
   


-- 
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