File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- import { Static , TAnySchema , TSchema } from "@sinclair/typebox" ;
1+ import { Static , StaticDecode , TAnySchema , TSchema } from "@sinclair/typebox" ;
22import { Decode , Encode } from "@sinclair/typebox/value" ;
33import { RedisValue } from "./command" ;
44import { RedisTransform } from "./transform" ;
@@ -11,9 +11,11 @@ export type TRedisHash<TValue extends TSchema = TAnySchema> = Record<
1111/**
1212 * The value type of a Redis key that points to a primitive value or a hash map.
1313 */
14- export type Value < T extends TSchema | TRedisHash < TSchema > > = T extends TSchema
15- ? Static < T >
16- : { [ K in RedisField < T > ] ?: Value < T [ K ] > } ;
14+ export type Value < T extends TSchema | TRedisHash < TSchema > > = [ T ] extends [
15+ TSchema ,
16+ ]
17+ ? StaticDecode < T >
18+ : { [ K in RedisField < T > ] ?: StaticDecode < T [ K ] > } ;
1719
1820/**
1921 * A field name of a Redis key that points to a hash map.
You can’t perform that action at this time.
0 commit comments