Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
interface Test {
readonly [key: string]: Test1;
}
interface Test1 {
readonly [key: string]: Test;
}
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {},
};
tsconfig
Expected Result
isTypeReadonly
for type Test
should return true
Actual Result
Error:
RangeError: Maximum call stack size exceeded
at getReducedApparentType (C:\Users\User\IdeaProjects\typescript-eslint\node_modules\typescript\lib\typescript.js:59926:40)
at Object.getPropertiesOfType (C:\Users\User\IdeaProjects\typescript-eslint\node_modules\typescript\lib\typescript.js:59550:20)
at TypeObject.Object.<anonymous>.TypeObject.getProperties (C:\Users\User\IdeaProjects\typescript-eslint\node_modules\typescript\lib\typescript.js:166905:33)
at getProperties (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:131:27)
at isTypeReadonlyObject (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:301:28)
at isTypeReadonlyRecurser (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:120:14)
at checkIndexSignature (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:203:36)
at isTypeReadonlyObject (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:301:28)
at isTypeReadonlyRecurser (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:120:14)
at checkIndexSignature (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:203:36)
at isTypeReadonlyObject (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:301:28)
at isTypeReadonlyRecurser (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:120:14)
at checkIndexSignature (C:\Users\User\IdeaProjects\typescript-eslint\packages\type-utils\src\isTypeReadonly.ts:203:36)
Additional Info
Related to #4476.
Versions
Not relevant
{ "compilerOptions": {} }