Closed BenGu3 closed 4 years ago
I suspect it might be related with https://github.com/JMPerez/spotify-web-api-js/pull/112/commits/0da981151937e7474fc8461ec60a364107c91f2d.
I'm changing the README to use import SpotifyWebApi from 'spotify-web-api-js'
instead. Thus how projects out there using typescript are doing it.
Duplicated of #149
Describe the bug According to the README, when using Typescript with this library, the import and constructor for the library is as follows:
It looks like the type definitions say the constructor is the default export, so when you import as above, you actually use the constructor like this:
To Reproduce Steps to reproduce the behavior: https://codesandbox.io/s/heuristic-diffie-bfzm0?file=/src/spotify.ts
Expected behavior You should be able to have access to the types and also call the constructor without having to use a
.default()
.Additional context It looks like this happened in v1.1.1. You can change the package version on the left side bar in the codesandbox.