@just-func/types
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -15,4 +15,9 @@ import type { AnyFunction, Equal } from 'type-plus'; | ||
}; | ||
export declare type JustFunction<P extends [arg?: any] = [arg?: any], V = undefined, M extends JustMeta | undefined = undefined> = (...args: P) => JustValue<V, M>; | ||
export declare function justFunction<P extends [arg?: any] = [arg?: any], V = undefined, M extends JustMeta | undefined = undefined>(fn: JustFunction<P, V, M>): JustFunction<P, V, M>; | ||
export declare type JustMetaParam = { | ||
readonly [k: string | symbol]: any; | ||
}; | ||
export declare type JustFunction<Param extends [arg?: any, meta?: JustMetaParam] = [arg?: any, meta?: JustMetaParam], R extends JustEmpty | JustUno<any> | JustDuo<any, JustMeta> = JustEmpty> = (...args: Param) => (R extends readonly [infer V, infer M] ? readonly [V, M] : R); | ||
export declare function justFunction<Param extends [arg?: any, meta?: JustMetaParam], R extends JustEmpty>(fn: JustFunction<Param, R>): JustFunction<Param, readonly []>; | ||
export declare function justFunction<Param extends [arg?: any, meta?: JustMetaParam], R extends JustUno<any>>(fn: JustFunction<Param, R>): JustFunction<Param, R extends JustUno<infer V> ? JustUno<V> : never>; | ||
export declare function justFunction<Param extends [arg?: any, meta?: JustMetaParam], R extends JustDuo<any, JustMeta>>(fn: JustFunction<Param, R>): JustFunction<Param, R extends JustDuo<infer V, infer M> ? JustDuo<V, M> : never>; | ||
//# sourceMappingURL=Just.d.ts.map |
{ | ||
"name": "@just-func/types", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Types for just-func code", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19107
81