ERROR in node_modules/@types/color/index.d.ts:13:40 - error TS2716: Type parameter 'T' has a circular default.
13 interface Color<T extends ColorParam = ColorParam> {
shouldn't it state?
interface Color<T = Color<ColorParam>> {
Getting this as well
Hello, got into the same issue. Opened PR #41815 to fix it
Make sure your TypeScript versions are up to date. Circular dependencies were introduced in 3.7.
You can wait with updating the package until you've updated TS, as the update doesn't add missing types or change anything else, it's just for developer experience.
Coming back to what I said in the PR, in this case we are just mirroring the version of the modules and not really sticking to semver for the typings.
Now, my PR is not only for dev experience but mainly for building my projects in my CI.
Switching from 3.0.0 to 3.0.1 shouldn鈥檛 imply upgrading side dependencies based on semver since it鈥檚 supposedly a patch and not a minor nor major
All types packages are indirectly dependant on TypeScript - I don't know if updating the required TS version is enough for a new major version (I don't believe it should be).
I don't know who to @ about this either, but it'd be nice to know for sure
Pinning the @types/color version to 3.0.0 resolved this compile error for me on Typescript 3.1.6. Thanks for filing this bug.
Most helpful comment
Pinning the
@types/colorversion to 3.0.0 resolved this compile error for me on Typescript 3.1.6. Thanks for filing this bug.