Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.0.0
Description
After trying to compile a typescript project, that contains `import { Table } from 'apache-arrow';` I get Typescript errors.
Steps to reproduce:
- installed ` "typescript": "4.2.2"` and ` "apache-arrow": "^5.0.0",`
- 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
- is duplicated by
-
ARROW-13790 Move ts files into a source directory in bundle
- Resolved
-
ARROW-13584 Please do not include .ts files in npm artifacts alongside .d.ts
- Resolved
- links to