Work
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2024-02-05 22:49:37 +01:00
parent bf71170667
commit db15ee23ba
6 changed files with 23 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
import { Fn } from "hotscript"
import { Simplify } from "type-fest"
import { AbstractClass, Simplify } from "type-fest"
/**
@@ -9,10 +9,17 @@ import { Simplify } from "type-fest"
*/
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"]>
}
/**
* Represents the static members of a class.
* @template Class - A class extending AbstractClass.
*/
export type StaticMembers<Class extends AbstractClass<any>> = (
Omit<Class, "prototype">
)
export interface StaticMembersFn extends Fn {
return: StaticMembers<this["arg0"]>
}