Declare implementations and dependencies via standard interfaces for operations #8

Merged
glen merged 20 commits from approach4.6 into main 2023-01-22 01:34:57 +00:00
Showing only changes of commit bd05dc9267 - Show all commits

View File

@ -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}