How does types.d.ts get updated in new versions?

I submitted a PR a few weeks ago to fix some TypeScript issues mostly declare module couchbase the pr was accepted but it doesn’t look like the types.d.ts file contains any of my changes but there are changes from other tickets JSCBC-797 and JSCBC-795 both on October 22.

Right now if I pull the latest version on github and run make docs there are significant deltas in the types declarations. The current types.d.ts is not usable or accurate. @brett19 I think this is a question for you

1 Like

Hey @ThrowsException,

Our typescript definitions are auto-generated based on our documentation, which you can see here:

Can you provide more details on the current types not being usable or accurate? We recently added checks to ensure that our types definitions are working correctly, but perhaps we still need to go a step further.

Cheers, Brett

Sure so this is just with a very basic starter app when I import the latest 3.0.7 I get this warning

When I pull the repo down from github and run make docs the types.d.ts file has multiple deltas and I can see in the one part the declaration of the module code from my PR is there

if I take the file I build locally and point my project at it directly the error from my IDE goes away.

I think there are still some issues with the requires that are brought in though. I’m not sure how to use the JsDoc to have it describe stuff like the exports.Cluster = require('./cluster') correctly.

I am having the same issue as @ThrowsException

1 Like

Hey @HcgRandon, @ThrowsException,
We just shipped our 3.1.0 release which has some further changes and updates to the type definitions. This should resolve any issues you are seeing. Please let me know if it does not!
Cheers, Brett

Sorry for the late reply. The latest release seems to fix the issue I was having here. However there are still some issues with the exports declare from the main /lib/couchbase module in that they are not picked up by typescript correctly. I can provide a minimal reproducible example here or in another post.