3ab6809e38
* Consider identical instances of the same symbol equivalent when creating union and intersection properties * Also copy over mapper and type (if available) on cloned symbols * Editorial feedback
14 lines
325 B
TypeScript
14 lines
325 B
TypeScript
//// [conditionalTypeClassMembers.ts]
|
|
declare class MyRecord {
|
|
private a();
|
|
b(): unknown;
|
|
}
|
|
|
|
declare class MySet<TSet extends MyRecord> {
|
|
public item(): TSet;
|
|
}
|
|
|
|
type DS<TRec extends MyRecord | { [key: string]: unknown }> = TRec extends MyRecord ? MySet<TRec> : TRec[];
|
|
|
|
//// [conditionalTypeClassMembers.js]
|