This commit is contained in:
@@ -2,6 +2,17 @@ import { Fn } from "hotscript"
|
||||
import { Simplify } from "type-fest"
|
||||
|
||||
|
||||
/**
|
||||
* Represents the common keys between two types.
|
||||
* @template A - The first type.
|
||||
* @template B - The second type.
|
||||
*/
|
||||
export type CommonKeys<A, B> = Extract<keyof A, keyof B>
|
||||
|
||||
export type KeysOnlyInLeft<Left, Right> = {
|
||||
[K in Exclude<keyof Left, keyof Right>]: Left[K]
|
||||
}
|
||||
|
||||
export interface SimplifyFn extends Fn {
|
||||
return: Simplify<this["arg0"]>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user