Working exp.extends()

This commit is contained in:
Julien Valverdé
2024-01-31 06:44:18 +01:00
parent 11335f10cd
commit a0aa9446d6
5 changed files with 35 additions and 12 deletions

View File

@@ -1,3 +1,4 @@
import { Fn } from "hotscript"
import { AbstractClass } from "type-fest"
@@ -37,6 +38,10 @@ export type StaticMembers<Class extends AbstractClass<any>> = (
Omit<Class, "prototype">
)
export interface StaticMembersFn extends Fn {
return: StaticMembers<this["arg0"]>
}
/**
* Represents an array of static members corresponding to the provided classes.
* @template Classes - An array of classes extending AbstractClass.

View File

@@ -1,3 +1,4 @@
export * from "./class"
export * from "./extend"
export * from "./inheritance"
export * from "./misc"

7
src/util/misc.ts Normal file
View File

@@ -0,0 +1,7 @@
import { Fn } from "hotscript"
import { Simplify } from "type-fest"
export interface SimplifyFn extends Fn {
return: Simplify<this["arg0"]>
}