hkt-toolbelt
Version:
Functional and composable type utilities
15 lines (14 loc) • 542 B
TypeScript
import { Kind, Type } from '..';
/**
* `RecursiveKind` is a higher-order type-level function that serves as a
* subtype. It is used to express the fact that some other higher-order kind
* takes in itself as a type argument.
*
* @template {RecursiveKind} F - Input type of the recursive kind.
*
* This type-level function doesn't do much on its own, but it is useful in
* combination with other type-level functions.
*/
export interface RecursiveKind extends Kind.Kind {
f(x: Type._$cast<this[Kind._], RecursiveKind>): unknown;
}