Sendgrid-nodejs: typescript: error TS2305: '.../node_modules/sendgrid/index' has no exported member 'SendGrid'

Created on 19 Nov 2016  路  6Comments  路  Source: sendgrid/sendgrid-nodejs

Issue Summary

Sendgrid version: 4.7.1

Trying to make use of sendgrid in typescript. Cannot make use of the SendGrid namespace.

Would be great to have some working examples of using typescript with sendgrid.

Steps to Reproduce

  1. clone sendgrid-ts-demo repo, `
  2. npm install
  3. npm test (which runs tsc)
  4. error

Technical details:

  • sendgrid-nodejs Version: 4.7.1
  • Node.js Version: 5.5.0
  • Typescript Version: 1.8.10, 2.0.6
help wanted question

Most helpful comment

Sorry about that, just a problem with my demo project (it was out of date). I've fixed that up and all should be working now, feel free to let me know if you run into any further issues.

For reference sake, the demo project previously imported using import {SendGrid} from "sendgrid"; where it should have been using import * as SendGrid from "sendgrid".

All 6 comments

Thank you for the letting us know this is an issue! We have added this to our backlog and will respond as soon as we possibly can. I am sorry for the delay.

cc @SPARTAN563

Will take a look :+1:

Sorry about that, just a problem with my demo project (it was out of date). I've fixed that up and all should be working now, feel free to let me know if you run into any further issues.

For reference sake, the demo project previously imported using import {SendGrid} from "sendgrid"; where it should have been using import * as SendGrid from "sendgrid".

Thank you @SPARTAN563, your awesomeness is appreciated :)

Thanks guys!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thinkingserious picture thinkingserious  路  4Comments

mikemaccana picture mikemaccana  路  4Comments

prasoonjalan picture prasoonjalan  路  3Comments

Loriot-n picture Loriot-n  路  4Comments

egges picture egges  路  3Comments