hkt-toolbelt
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -12,2 +12,14 @@ import $, { Cast, Kind, Type, Union } from "."; | ||
} | ||
export declare type _$mapKeys<T extends Record<string, unknown>, F extends Kind> = { | ||
[key in keyof T as $<F, Cast<key, Kind.InputOf<F>>>]: T[key]; | ||
}; | ||
export declare abstract class MapKeys<F extends Kind<(x: string) => string>> extends Kind { | ||
abstract f: (x: Cast<this[Kind._], Record<string, unknown>>) => _$mapKeys<typeof x, F>; | ||
} | ||
export declare type _$mapValues<T extends Record<string, unknown>, F extends Kind> = { | ||
[key in keyof T]: $<F, Cast<T[key], Kind.InputOf<F>>>; | ||
}; | ||
export declare abstract class MapValues<F extends Kind> extends Kind { | ||
abstract f: (x: Cast<this[Kind._], Record<string, Kind.InputOf<F>>>) => _$mapValues<typeof x, F>; | ||
} | ||
declare type RecursiveKindInput<F extends Kind> = Kind.InputOf<F> | Record<string, Kind.InputOf<F>> | { | ||
@@ -14,0 +26,0 @@ [key: string]: RecursiveKindInput<F>; |
{ | ||
"name": "hkt-toolbelt", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Functional and composable type utilities", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
@@ -65,2 +65,10 @@ import { Cast, Conditional, Kind, List } from "."; | ||
} | ||
export declare type _$toUpper<S extends string> = Uppercase<S>; | ||
export declare abstract class ToUpper extends Kind { | ||
abstract f: (x: Cast<this[Kind._], string>) => _$toUpper<typeof x>; | ||
} | ||
export declare type _$toLower<S extends string> = Lowercase<S>; | ||
export declare abstract class ToLower extends Kind { | ||
abstract f: (x: Cast<this[Kind._], string>) => _$toLower<typeof x>; | ||
} | ||
export * as String from "./string"; |
22970
356