0.1.2 #3

Merged
Thilawyn merged 136 commits from next into master 2024-03-11 19:44:21 +01:00
Showing only changes of commit 29d539ec32 - Show all commits

View File

@@ -22,6 +22,21 @@ export type Extend<T extends readonly object[]> = (
: {} : {}
) )
export type Override<T extends readonly object[]> = (
T extends readonly [
infer Super,
infer Self,
...infer Rest extends readonly object[],
]
? Override<readonly [
Omit<Super, CommonKeys<Self, Super>> & Self,
...Rest,
]>
: T extends readonly [infer Self]
? Self
: {}
)
/** /**
* Merges an inheritance tree defined by an array of types without allowing overrides. * Merges an inheritance tree defined by an array of types without allowing overrides.
* @template T - An array of types representing the inheritance tree. * @template T - An array of types representing the inheritance tree.