Open Michael-Ziluck opened 11 months ago
It would appear it's because of TypeScript's depth limit. MaxInt<45>
works fine, but MaxInt<46>
and beyond all fail.
Also worth noting that MaxInt isn't even working as intended at the moment. This resolves and compiles fine when it should fail:
const pageSize: MaxInt<45> = 50;
Discovered the source of the problem. This SDK does not constrain the TypeScript version but is unusable by any version of TypeScript before 4.5 as that is when they added tail-recursion elimination.
For now I'll just update but it is definitely worth looking into updating the package.json
in this project to properly constrain packages.
Error
When using TypeScript and the SDK, calling any function that uses
MaxInt
results in the following error:When instantiating it in-line, the same thing also occurs:
Even when trying it with the old version of MaxInt before https://github.com/spotify/spotify-web-api-ts-sdk/pull/48 has the same problem. Not sure how others have not reported it yet.
Versions
Output from
npm --versions
:Output from
npm list
: