Closed duckdotapk closed 5 months ago
@duckdotapk I cannot reproduce with version of server SDK (3.7.1
) or with the version you are reporting. Can you share your tsconfig.json
so I can take a look to see if there is something wonky with it?
@manchuck It seems to be related to me having skipLibCheck
explicitly set to false
in my tsconfig.json
.
If I set it to true
, the errors go away. I don't quite remember why I set it like this, though, and I think there might still be a problem in the SDK regardless? I'm not sure.
Btw, this is with 3.7.2
installed now.
@duckdotapk Ahh, that would do it. For now, skipLibCheck
is set to true due to some conflicts when bucket files were added. We had code samples that suggested importing like @vonage/voice/dist/classes/NCCO/Conversation
. Since that is not ideal (as you would need to know the whole structure of each package), bucket files were created. I had some concerns that developers were still using that older method of importing and wanted to deprecate the older way of importing. There were many cases where we had types, interfaces and classes all named the same when they should have been made unique. We will be going through and resolving these conflicts which will allow us to turn off skipLibCheck
Quick update for you @duckdotapk There is a current initiative to add documentation to the code. This is requiring fixes in Typescript which will no longer require us to need to have skipLibCheck
enabled.
Fantastic, thanks for the update. :)
@duckdotapk I am wrapping up this work with #872 As it is the end of the year, wont be released until early Jan. I apologize that we were not able to get this out sooner for you. I hope you have a happy holiday and I will provide an update once I get back from the holidays
That's awesome, I appreciate it a lot! No worries about the time frame and I hope you have a happy holiday, too!
This should be resolved now that v3.12.0 has been released
@manchuck Awesome! Thank you for your hard work, Hot Dog Hat Man.
🌭
Side question: How are the doc blocks looking in your IDE of choice?
@manchuck A little bit broken looking in WebStorm 2023.3.1 though I'm not sure if that's your fault or theirs.
hmm maybe it does not recognize ts
as a valid render. Or I'm building out the @example
tag incorrectly. I'll have to play around with it. Thanks for the screen shot
Expected Behavior
This should not cause TypeScript errors.
Current Behavior
Importing the
Vonage
class as follows:Causes the following TypeScript errors:
Possible Solution
This seems to be because the
packages/voice/lib/types.ts
file does not actually export these types.I can see they are defined in the
types/NCCO
folder so maybe it should? I'm not sure of the exact solution because I'm not that familiar with the inner design decisions of this SDK.Steps to Reproduce (for bugs)
As far as I can tell, just import the
Vonage
class as described above in a TypeScript project.Context
I periodically audit my packages and update out-of-date ones but these errors cropping up when upgrading
@vonage/server-sdk
from 3.4.0 to 3.7.0, which indirectly updates@vonage/voice
from 1.4.0 to 1.6.0 in mypackage-lock.json
, has made me revert the upgrade for now.Today, I had some time to write up this issue so it can hopefully get acknowledged and fixed.
Your Environment
@vonage/server-sdk@3.7.0
@vonage/voice@1.6.0