Skip to content

#46218 breaks ramda types on DT #46582

Closed
@sandersn

Description

@sandersn

Edit from DanielRosenwasser: #46218 #46218 #46218 #46218 #46218 #46218

I'm working on a standalone repro, but you can see the error now by opening types/ramda/tools.d.ts and looking at lines 149 and 179:

export type Evolvable<E extends Evolver> = {
    [P in keyof E]?: Evolved<E[P]>;
};
// ......
export type Evolver<T extends Evolvable<any> = any> = {
    // if T[K] isn't evolvable, don't allow nesting for that property
    [key in keyof Partial<T>]: ((value: T[key]) => T[key]) | (T[key] extends Evolvable<any> ? Evolver<T[key]> : never);
};

There are now errors on constraints for E and T saying that "Type parameter 'E' has a circular constraint.".

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueRecent RegressionThis is a new regression just found in the last major/minor version of TypeScript.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions