Open neodescis opened 5 days ago
Hey @neodescis - thanks for raising this, sorry to hear it's causing you problems. To my understanding you shouldn't need skipLibCheck: true
when using Terra Draw. I have just disabled it on two of projects that use Terra Draw directly with 1.0.0-beta.6
:
https://github.com/JamesLMilner/terra-draw-route-snap-mode https://github.com/JamesLMilner/terra-draw-website
And I was not able to see any build errors. Are you able to share the repository with me if it's open source? If not potentially a minimal reproducible example? I would be interested to learn more and want to try and resolve this for you.
I cannot share my repo, but I was able to recreate it on StackBlitz easily enough. I went with Angular as that's what we're using.
https://stackblitz.com/edit/stackblitz-starters-i6yevv?file=src%2Fapp%2Fapp.component.ts
One thought that jumps to mind is that Angular is shifting to esbuild, which may be a piece to the puzzle. The example above and our project are both using it.
I also went through and verified that all of the tsconfig settings are the same as for our project.
Did this get auto-closed on accident? Your change is good, but the third-party references are still an issue. I've updated the StackBlitz to beta 7.
Hey @neodescis, yes it did, if you put an issue in the PR it seems to close it automatically. As you say this initially only resolves the internal issues. Resolving the external dependency issues is harder but I am exploring options for doing that.
Funnily in trying to reproduce this I actually hit my own issues trying to compile just MapLibre GL with tsc without skipLibCheck. I filed it here https://github.com/maplibre/maplibre-gl-js/issues/4855
Not strictly related to this issue but thought I'd share as has been a bit of a stumbling block for me testing locally.
Describe the bug It seems that I cannot build a TypeScript project that references terra-draw without skipLibCheck enabled in my project. Without that, I get a bunch of TypeScript compilation errors. Here's a sampling:
The first error seems to be from referencing a file that isn't provided in the npm bundle (I do not see a common folder, or base.adapter.d.ts anywhere). I'm not sure why that file isn't included?
The other errors appear to come from not having various things installed to support the various adapters. However, I definitely do not want to install OpenLayers and others when I only care about MapLibre. One way something like this is generally solved is to move each adapter into its own npm package to separate out the dependencies.
Terra Draw npm version 1.0.0-beta.6
To Reproduce Steps to reproduce the behavior:
Expected behavior No build errors!
Additional context Requiring skipLibCheck: true is onerous, and enabling it would not be doable in my project, where I have numerous internal dependencies that I would definitely like to get type-checked.