Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13884

Arrow 5.0.0 cannot compile with Typescript 4.2.2

    XMLWordPrintableJSON

Details

    Description

      After trying to compile a typescript project, that contains `import { Table } from 'apache-arrow';` I get Typescript errors.

       

      Steps to reproduce:

      1. installed ` "typescript": "4.2.2"` and ` "apache-arrow": "^5.0.0",`
      2. run `tsc --traceResolution`

       

      Expected result:

      Compiles without errors.

       

      Actual Result:
      ```

      ======== Module name 'apache-arrow' was successfully resolved to '/.../apache/node_modules/apache-arrow/Arrow.node.d.ts' with Package ID 'apache-arrow/Arrow.node.d.ts@5.0.0'. ========
      ======== Resolving module './Arrow.dom' from '/.../apache/node_modules/apache-arrow/Arrow.node.d.ts'. ========
      Explicitly specified module resolution kind: 'NodeJs'.
      Loading module as file / folder, candidate module location '/.../apache/node_modules/apache-arrow/Arrow.dom', target file type 'TypeScript'.
      File '/.../apache/node_modules/apache-arrow/Arrow.dom.ts' exist - use it as a name resolution result.

      ```

      Since Typescript files live alongside Javascript files, NodeJS module resolution resolves `Arrow.dom` in the main file to `Arrow.dom.ts`, and all of the other .ts files imported there are being compiled.

      Attachments

        Issue Links

          Activity

            People

              domoritz Dominik Moritz
              zofia Zofia Góralewska
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m