Skip to content
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

Make typescript throw "cannot be named" error #1

Closed

Conversation

frederickfogerty
Copy link

No description provided.

@notheotherben
Copy link
Owner

Thanks @frederickfogerty, unfortunately I don't have my laptop with me this evening but I'll take a look tomorrow.

Unfortunately I suspect it's going to be an issue to fix the problem reliably because we'll need to find a way to export both the interface for sendgrid and a namespace, and there are some extra restrictions in place for bundled modules which aren't there for standard type definitions.

@frederickfogerty
Copy link
Author

Unfortunately I suspect it's going to be an issue to fix the problem reliably because we'll need to find a way to export both the interface for sendgrid and a namespace, and there are some extra restrictions in place for bundled modules which aren't there for standard type definitions.

Sounds like this is exactly what is going on - I've tried to modify your definition files to solve this issue and #2, but I'm unable to - it seems that you can't have both a export = (required for a commonjs declaration), and also export some other things, such as an interface. 😢

Are you using SendGrid in a typescript project yourself? What do you do to solve this problem?

notheotherben pushed a commit to notheotherben/sendgrid-nodejs that referenced this pull request Sep 20, 2016
See sendgrid#251 and <notheotherben/sendgrid-ts-demo#1> for more details on what wasn't working
shkabo pushed a commit to shkabo/sendgrid-nodejs that referenced this pull request Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants