Closed mikelax closed 2 years ago
My goal is to have the types in the .js files be both legal jsdoc types as well as correct typescript types. I don't think that's possible here because jsdoc doesn't support tuples (see https://github.com/jsdoc/jsdoc/issues/1703).
My work-around was to use a simple Array
in jsdoc, and hand-edit the .ts file with the proper tuple type.
Will this work for you?
Hello @hildjj i think your initial goal would be great to have the types generated from jsdoc.
In this case I think your idea of (for now) hand editing the type file to solve this one case is correct.
Thank you for addressing!
Overview
I am trying to use version 2.0.0 and I am getting a Typescript error when I try to build my project. The error is as follows:
I get this error using both typescript
4.3.x
and4.4.x
.Fix
I think the fix is to make the Array take an implicit object of Buffer and string in the
wsd.d.ts
file. I believe this resolves the issue: