We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type alias circularly references itself (5.4 regression)
https://www.typescriptlang.org/play?ts=5.4.5#code/C4TwDgpgBAQg9nANhAhgOwAouACwM4A8AKgHxQC8UewATgJZoDmUAZALABQUUA3p99wDaAaSgMoAawgg4AMyhEAugC4FIxVAgAPYBDQATPFABGCZOn4DuAfijDLV1UXWadew1DjGAVhADGwA4CtqLaugZGaACuALbGEDRQAD5UtAyMQVa2AAYAJDzCAL4AdPnwSKiY2PjE6iSF2ZkCqmgQAG4JTS3tCQDcloWCUjLySv0c-EA
type BooleanPaths<T> = string & { [K in keyof T]: T[K] extends boolean ? K : T[K] extends object ? K extends number | string ? `${K}.${BooleanPaths<T[K]>}` : never : never; }[keyof T];
This code fails with two errors:
Type alias 'BooleanPaths' circularly references itself. Type 'BooleanPaths' is not generic.
The compilation should pass, as it has in previous versions.
No response
The text was updated successfully, but these errors were encountered:
Bisects to #56515
Sorry, something went wrong.
ahejlsberg
No branches or pull requests
π Search Terms
Type alias circularly references itself (5.4 regression)
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.4.5#code/C4TwDgpgBAQg9nANhAhgOwAouACwM4A8AKgHxQC8UewATgJZoDmUAZALABQUUA3p99wDaAaSgMoAawgg4AMyhEAugC4FIxVAgAPYBDQATPFABGCZOn4DuAfijDLV1UXWadew1DjGAVhADGwA4CtqLaugZGaACuALbGEDRQAD5UtAyMQVa2AAYAJDzCAL4AdPnwSKiY2PjE6iSF2ZkCqmgQAG4JTS3tCQDcloWCUjLySv0c-EA
π» Code
π Actual behavior
This code fails with two errors:
Type alias 'BooleanPaths' circularly references itself.
Type 'BooleanPaths' is not generic.
π Expected behavior
The compilation should pass, as it has in previous versions.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: