chore: make SignatureKey generic instead of using unknown
This commit is contained in:
parent
e468ec72dd
commit
bd05dc9267
@ -66,10 +66,10 @@ export interface Signatures<T> {
|
||||
re: (a: T) => RealType<T>
|
||||
}
|
||||
|
||||
type SignatureKey = keyof Signatures<unknown>
|
||||
type SignatureKey<T> = keyof Signatures<T>
|
||||
|
||||
export type Signature<Name extends SignatureKey, T> = Signatures<T>[Name]
|
||||
export type Returns<Name extends SignatureKey, T> = ReturnType<Signatures<T>[Name]>
|
||||
export type Dependencies<Name extends SignatureKey, T> = {[K in Name]: Signature<K, T>}
|
||||
export type Signature<Name extends SignatureKey<T>, T> = Signatures<T>[Name]
|
||||
export type Returns<Name extends SignatureKey<T>, T> = ReturnType<Signatures<T>[Name]>
|
||||
export type Dependencies<Name extends SignatureKey<T>, T> = {[K in Name]: Signature<K, T>}
|
||||
|
||||
export type AliasOf<Name extends string, T> = T & {aliasOf?: Name}
|
||||
|
Loading…
Reference in New Issue
Block a user