-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile typescript without adding @types/express #671
Comments
Hello @victorbadila, We are not including Is it a requirement that your project be With best regards, Elmer |
It is not a requirement that my project is The only things I do twilio related are:
Could it be that first |
Please try: What documentation did you use to get started? Thanks! |
I tried it like this, it still gives me an error if I don't have @types/express installed as a dev dependency. For documentation I looked here https://github.com/twilio/twilio-node/blob/main/examples/typescript/example.ts |
There's a nice Twilio blog post on how to get started with Twilio and TypeScript. Regarding whether or not the This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog. |
@thinkingserious it's a bit of a bummer if a shop is all koa-based, or using something like apollo-server-lambda, to have to include types manually in our dependencies for a package that we have no interest in, nor use for. Kind of a wonky architecture decision to force users to install that. I get why you're piggy backing on express types, but that's making a grand assumption about the majority use-case.
I'm a core team member on the Rollup project, and the lead for the official plugins repo. The rollup project ships types with everything we can (or have time to add to) because enough users these days use TypeScript that it makes sense to. It's no longer niche, so plain vanilla JS users (I'm one of them half the time) have come to expect to see TS accommodations within packages. It's no longer black magic. Catering to vanilla JS users over TS users is making what should be an equal class of developer a 2nd class citizen in the ecosystem. All together, the Rollup project and it's plugins have around 50x the weekly downloads that twilio-node enjoys, and we've seen no net negatives from including dependency types in devDeps that are required to deliver an effective and smooth developer experience. @eshanholtz "unnecessary package bloat" only applies to |
Fixed by #675 |
Issue Summary
I'm not able to build a typescript project with this package just by adding the
twilio
and@types/twilio
packages, when I build the solution. I am not using anything express related in terms of imports from twilio and my project is express free as well.If I install
@types/express
as a dev dependency then it will build, but I don't think that's how it's supposed to work.Steps to Reproduce
twilio
as dependency and@types/twilio
as dev dependencynpm run build
Exception/Log
Technical details:
The text was updated successfully, but these errors were encountered: