Open tuner opened 1 year ago
I recently did some work on typing in https://github.com/GMOD/bam-js/pull/96 as there was indeed a need for some improvements. It may culminate with a major version bump, pretty minor changes to the api but changes nonetheless
I'm not sure about the long thing, sometimes that can imply that I need to include @types/long in the actual dependencies of @gmod/bam instead of just the devDependencies
I would have to assess if there are any remaining type improvements that can be done
Just curious are you using skipLibCheck:true or false?
It's on the default setting (false?). It seems that I can get rid of the error message by setting it to true. Is it a good long-term solution?
We can likely aim to fix usage of @gmod/bam with skipLibCheck:false (e.g. the default) but I have used skipLibCheck:true in a lot of my projects that consume libraries like @gmod/bam (not ideal, but a quick workaround for stuff like this)
Thanks, Colin! It seems that skipLibCheck skips those parts of library type definitions I'm not using anywhere, so, I think I can safely enable it for now.
Hi,
I'm trying to validate types (I'm using TS through JSDoc) in my codebase using
tsc
, but I stumbled upon a couple of issues in@GMOD/bam@1.1.18
.The first one:
There's no
"long"
package imported inutil.d.ts
(https://cdn.jsdelivr.net/npm/@gmod/bam@1.1.18/dist/util.d.ts), although it's in the original source file: https://github.com/GMOD/bam-js/blob/492c145a3a714d898b3a38f82030876900ad7ede/src/util.ts#L1🤷
If I checkout
v1.1.18
of this repo and compile the project, the long import is missing fromutil.d.ts
. If I checkout HEAD and compile, then it's there. Maybe there's some problem in the oldtypescript@4.9.4
(?)And then there's the other issue:
Indeed, they are different: https://github.com/GMOD/bam-js/blob/492c145a3a714d898b3a38f82030876900ad7ede/src/bamFile.ts#L401 https://github.com/GMOD/bam-js/blob/492c145a3a714d898b3a38f82030876900ad7ede/src/htsget.ts#L110
However, I don't have enough knowledge of TypeScript to say whether these should be compatible or not. 🤔
And btw, I'm using
typescript@5.0.4
.