unikvs 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import type {
5
5
  ClearOptionsSchema,
6
6
  CloseOptionsSchema,
7
7
  } from "./_unikvs.schemas.js";
8
- import type { InferInput } from "./_valibot.js";
8
+ import type * as v from "./_valibot.js";
9
9
  import type { $InferPlainValueInput } from "./_value-schemas.js";
10
10
  import type { KeyValueMapping } from "./unikvs-branch.js";
11
11
  import type { Value, PlainValue, StreamValue } from "./value-schemas.js";
@@ -53,12 +53,12 @@ export type KeyofKeyValueMappingHasStreamValue<TKeyValueMapping extends KeyValue
53
53
  /**
54
54
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#client-operations)
55
55
  */
56
- export type OpenOptions = InferInput<typeof OpenOptionsSchema>;
56
+ export type OpenOptions = v.InferInput<typeof OpenOptionsSchema>;
57
57
 
58
58
  /**
59
59
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#client-operations)
60
60
  */
61
- export type CloseOptions = InferInput<typeof CloseOptionsSchema>;
61
+ export type CloseOptions = v.InferInput<typeof CloseOptionsSchema>;
62
62
 
63
63
  /**
64
64
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#client-operations)
@@ -191,4 +191,4 @@ export type DeleteOptions<TKey = string> = {
191
191
  /**
192
192
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#client-operations)
193
193
  */
194
- export type ClearOptions = InferInput<typeof ClearOptionsSchema>;
194
+ export type ClearOptions = v.InferInput<typeof ClearOptionsSchema>;
@@ -1,4 +1,4 @@
1
- import type { InferInput, InferOutput, GenericSchema } from "./_valibot.js";
1
+ import type * as v from "./_valibot.js";
2
2
  import {
3
3
  type ValueSchemaInfo,
4
4
  type ValueSchemaKind,
@@ -17,7 +17,7 @@ type ValueSchemaDescriptor = ValueSchemaInfo & {
17
17
  */
18
18
  function createValueSchemaDescriptor(
19
19
  kind: ValueSchemaKind,
20
- schema: GenericSchema,
20
+ schema: v.GenericSchema,
21
21
  ): ValueSchemaDescriptor {
22
22
  return {
23
23
  [VALUE_SCHEMA_BRAND]: true,
@@ -43,12 +43,12 @@ export type PlainValue<TData = any, TInput = TData> = [
43
43
  /**
44
44
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#value-types)
45
45
  */
46
- export function PlainValue<const TSchema extends GenericSchema>(
46
+ export function PlainValue<const TSchema extends v.GenericSchema>(
47
47
  schema: TSchema,
48
- ): PlainValue<InferOutput<TSchema>, InferInput<TSchema>> {
48
+ ): PlainValue<v.InferOutput<TSchema>, v.InferInput<TSchema>> {
49
49
  return createValueSchemaDescriptor("plain", schema) as unknown as PlainValue<
50
- InferOutput<TSchema>,
51
- InferInput<TSchema>
50
+ v.InferOutput<TSchema>,
51
+ v.InferInput<TSchema>
52
52
  >;
53
53
  }
54
54
 
@@ -69,12 +69,12 @@ export type StreamValue<TChunkData = any, TChunkInput = TChunkData> = [
69
69
  /**
70
70
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#value-types)
71
71
  */
72
- export function StreamValue<const TSchema extends GenericSchema>(
72
+ export function StreamValue<const TSchema extends v.GenericSchema>(
73
73
  schema: TSchema,
74
- ): StreamValue<InferOutput<TSchema>, InferInput<TSchema>> {
74
+ ): StreamValue<v.InferOutput<TSchema>, v.InferInput<TSchema>> {
75
75
  return createValueSchemaDescriptor("stream", schema) as unknown as StreamValue<
76
- InferOutput<TSchema>,
77
- InferInput<TSchema>
76
+ v.InferOutput<TSchema>,
77
+ v.InferInput<TSchema>
78
78
  >;
79
79
  }
80
80
 
@@ -88,11 +88,11 @@ export type Value<TDataAndChunkData = any, TInput = TDataAndChunkData> =
88
88
  /**
89
89
  * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#value-types)
90
90
  */
91
- export function Value<const TSchema extends GenericSchema>(
91
+ export function Value<const TSchema extends v.GenericSchema>(
92
92
  schema: TSchema,
93
- ): Value<InferOutput<TSchema>, InferInput<TSchema>> {
93
+ ): Value<v.InferOutput<TSchema>, v.InferInput<TSchema>> {
94
94
  return createValueSchemaDescriptor("any", schema) as unknown as Value<
95
- InferOutput<TSchema>,
96
- InferInput<TSchema>
95
+ v.InferOutput<TSchema>,
96
+ v.InferInput<TSchema>
97
97
  >;
98
98
  }