TypeScript Version: 3.7.2 (and also nightly)
Search Terms:circularly references itself, Record circular reference
Code
typeRecursiveTypeA=Record<number,RecursiveTypeA>// error: Type alias 'RecursiveTypeA' circularly references itself.typeRecursiveTypeB=RecursiveTypeB[]// works finetypeRecursiveTypeC={[index: number]: RecursiveTypeC}// works fineExpected behavior:
Record type should work like the third example that defines an object with number keys to the recursive value (the key type is irrelevant).
Actual behavior:
Only the Record type fail with circular reference
Playground Link:link
Related Issues: couldn't find any specific related issues
TypeScript Version: 3.7.2 (and also nightly)
Search Terms:
circularly references itself,Record circular referenceCode
Expected behavior:
Record type should work like the third example that defines an object with number keys to the recursive value (the key type is irrelevant).
Actual behavior:
Only the Record type fail with circular reference
Playground Link:link
Related Issues: couldn't find any specific related issues