twilio / twilio-node

Node.js helper library
MIT License
1.39k stars 509 forks source link

Missing type exports from the latest package #919

Closed meelist closed 1 year ago

meelist commented 1 year ago

Issue Summary

I'm trying to use the latest version 4 of the package and I'm unable to import the VoiceGrant type. It seems that compared to version 3, they are not exported anymore. However the documentation still states that you can/should import it when using access tokens.

https://www.twilio.com/docs/iam/access-tokens

Technical details:

childish-sambino commented 1 year ago

I've not been able to recreate this using the linked snippets. Is this TS or JS? Do you have a code example that's no longer working?

meelist commented 1 year ago

I am using a ES6 style import in TS which worked fine in v3 since it contains a specific export for VoiceGrant, but the export keyword has been removed in v4 of the package for all the different grant types.

import AccessToken, { VoiceGrant } from 'twilio/lib/jwt/AccessToken';

childish-sambino commented 1 year ago

Ah, I see. Working on a fix ...