Open spock64 opened 4 years ago
Hi,
Your example does not work in a node.js app. The following error is generated:
const api = new Cov19API({ ^ TypeError: Cov19API is not a constructor
I think it may be to do with the way that you transpire your typescript?
What does work is adding ".default" to the require():
const Cov19API = require('@publichealthengland/uk-covid19').default;
Hi @spock64, thanks for the heads up. That's true. I'll correct it later.
Hi,
Your example does not work in a node.js app. The following error is generated:
const api = new Cov19API({ ^ TypeError: Cov19API is not a constructor
I think it may be to do with the way that you transpire your typescript?
What does work is adding ".default" to the require():
const Cov19API = require('@publichealthengland/uk-covid19').default;