[isTypeReadonly] Conditional types are always marked as readonly #4420
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: type-utils
Issues related to the @typescript-eslint/type-utils package
Repro
Expected Result
isTypeReadonly
should returnfalse
Actual Result
isTypeReadonly
returnstrue
for any conditional type.Additional Info
Conditional types aren't being tested for and are thus being treated as primitives.
typescript-eslint/packages/type-utils/src/isTypeReadonly.ts
Lines 201 to 205 in 97c0e86
Versions
@typescript-eslint/type-utils
5.9.0
@typescript-eslint/type-utils
5.9.0
TypeScript
4.5.4
node
17.1.0
Also note the error in the template in Versions:
@typescript-eslint/type-utils
's version is requested twice. I assume there is supposed to be only one or one is supposed to be@typescript-eslint/experimental-utils
The text was updated successfully, but these errors were encountered: