twilio / twilio-taskrouter.js

JS SDK v2 for Twilio's TaskRouter skills based routing system.
https://www.twilio.com/docs/taskrouter
Other
24 stars 32 forks source link

Getting TS errors when using twilio-taskrouter #87

Closed rh-meowsa closed 1 year ago

rh-meowsa commented 1 year ago

Two issues I would like to get resolved:

  1. remove the unnecessary async in front of the transfer function (like the surrounding functions) https://github.com/twilio/twilio-taskrouter.js/blob/master/types.d.ts#L89

Currently causing: TS1070: 'async' modifier cannot appear on a type member

  1. change int to number as there's no such primitive type in TS https://github.com/twilio/twilio-taskrouter.js/blob/master/types.d.ts#L109

Currently causing: TS2304: Cannot find name 'int'

rh-meowsa commented 1 year ago

This is a fairly straightforward fix. Tagging @ashishkumarTWLO who recently updated this package to see if this can be resolved quickly.

rh-meowsa commented 1 year ago

@vinesh-kumar also

ashishkumarTWLO commented 1 year ago

Hi @rh-meowsa, Can you provide following details:

rh-meowsa commented 1 year ago

No changes recently. It's just that continuing to use skipLibCheck to ignore these issues is a risk to my organization.

https://user-images.githubusercontent.com/119901583/235207398-dcfcc5e1-00d7-47dc-8a3b-d4b517824c93.mov

If you fork this you can get the repro in the video: https://codesandbox.io/p/sandbox/cool-heisenberg-tquu1n It is a simple React project and I'm using yarn tsc just to build Typescript to JS.

rh-meowsa commented 1 year ago

PTAL: https://github.com/twilio/twilio-taskrouter.js/pull/88 @ashishkumarTWLO @vinesh-kumar

ashishkumarTWLO commented 1 year ago

Hi @rh-meowsa, your suggested changes have been merged into the main branch, Thanks for pointing them out.