twilio / twilio-client.js

Twilio’s Programmable Voice JavaScript SDK
https://www.twilio.com/docs/voice/client/javascript
Other
67 stars 32 forks source link

[BUG] Duplicate type declaration in pstream.d.ts #143

Closed vicrep closed 4 years ago

vicrep commented 4 years ago

Code to reproduce the issue:

This is a new error occurring as of 1.10.1, on a project running typescript 3.7.5. This is similar to #139 but making a new ticket as it's specific to 1.10.1, and said ticket seemed to refer to an older version.

Run TSC with skipLibCheck disabled on a project requiring twilio-client:

node_modules/twilio-client/es5/twilio/pstream.d.ts:1:12 - error TS2300: Duplicate identifier 'PStream'.

1 export var PStream: typeof PStream;
             ~~~~~~~

node_modules/twilio-client/es5/twilio/pstream.d.ts:17:18 - error TS2300: Duplicate identifier 'PStream'.

17 declare function PStream(token: string, uri: string, options?: any): PStream;
                    ~~~~~~~

Found 2 errors.

Expected behavior:

Should pass type checking :)

Software versions:

charliesantos commented 4 years ago

Hi @vicrep , thank you for submitting. We will investigate further. Is this issue only happening with Angular build, similar to the ticket you referenced?

charliesantos commented 4 years ago

Jira CLIENT-7544

vicrep commented 4 years ago

Hi @charliesantos , thanks for the quick response!

This happens on a react app using typescript, and the type error seems specific to the internal types of the library, not interop with angular.

charliesantos commented 4 years ago

Thank you for this information @vicrep .

charliesantos commented 4 years ago

Fixed in #144 and will be included in 1.11. Please watch out for the release.

vicrep commented 4 years ago

Great! Thanks for the quick turnaround @charliesantos , appreciate it :)