@transcend-io/type-utils 2.0.0 → 3.0.0

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.
Files changed (167) hide show
  1. package/LICENSE +201 -21
  2. package/dist/index.d.mts +591 -0
  3. package/dist/index.d.mts.map +1 -0
  4. package/dist/index.mjs +529 -0
  5. package/dist/index.mjs.map +1 -0
  6. package/package.json +33 -41
  7. package/.yarn/sdks/eslint/package.json +0 -14
  8. package/.yarn/sdks/prettier/package.json +0 -7
  9. package/.yarn/sdks/typescript/package.json +0 -10
  10. package/README.md +0 -37
  11. package/build/aggregateObjects.d.ts +0 -27
  12. package/build/aggregateObjects.d.ts.map +0 -1
  13. package/build/aggregateObjects.js +0 -34
  14. package/build/aggregateObjects.js.map +0 -1
  15. package/build/apply.d.ts +0 -35
  16. package/build/apply.d.ts.map +0 -1
  17. package/build/apply.js +0 -47
  18. package/build/apply.js.map +0 -1
  19. package/build/codecTools/FixedLengthArray.d.ts +0 -20
  20. package/build/codecTools/FixedLengthArray.d.ts.map +0 -1
  21. package/build/codecTools/FixedLengthArray.js +0 -11
  22. package/build/codecTools/FixedLengthArray.js.map +0 -1
  23. package/build/codecTools/FixedLengthString.d.ts +0 -17
  24. package/build/codecTools/FixedLengthString.d.ts.map +0 -1
  25. package/build/codecTools/FixedLengthString.js +0 -10
  26. package/build/codecTools/FixedLengthString.js.map +0 -1
  27. package/build/codecTools/NonEmptyString.d.ts +0 -12
  28. package/build/codecTools/NonEmptyString.d.ts.map +0 -1
  29. package/build/codecTools/NonEmptyString.js +0 -6
  30. package/build/codecTools/NonEmptyString.js.map +0 -1
  31. package/build/codecTools/createDefaultCodec.d.ts +0 -39
  32. package/build/codecTools/createDefaultCodec.d.ts.map +0 -1
  33. package/build/codecTools/createDefaultCodec.js +0 -114
  34. package/build/codecTools/createDefaultCodec.js.map +0 -1
  35. package/build/codecTools/decodeCodec.d.ts +0 -12
  36. package/build/codecTools/decodeCodec.d.ts.map +0 -1
  37. package/build/codecTools/decodeCodec.js +0 -47
  38. package/build/codecTools/decodeCodec.js.map +0 -1
  39. package/build/codecTools/dictionary.d.ts +0 -18
  40. package/build/codecTools/dictionary.d.ts.map +0 -1
  41. package/build/codecTools/dictionary.js +0 -13
  42. package/build/codecTools/dictionary.js.map +0 -1
  43. package/build/codecTools/index.d.ts +0 -10
  44. package/build/codecTools/index.d.ts.map +0 -1
  45. package/build/codecTools/index.js +0 -10
  46. package/build/codecTools/index.js.map +0 -1
  47. package/build/codecTools/isCodecError.d.ts +0 -7
  48. package/build/codecTools/isCodecError.d.ts.map +0 -1
  49. package/build/codecTools/isCodecError.js +0 -9
  50. package/build/codecTools/isCodecError.js.map +0 -1
  51. package/build/codecTools/partialRecord.d.ts +0 -16
  52. package/build/codecTools/partialRecord.d.ts.map +0 -1
  53. package/build/codecTools/partialRecord.js +0 -11
  54. package/build/codecTools/partialRecord.js.map +0 -1
  55. package/build/codecTools/toJsonSchema.d.ts +0 -11
  56. package/build/codecTools/toJsonSchema.d.ts.map +0 -1
  57. package/build/codecTools/toJsonSchema.js +0 -115
  58. package/build/codecTools/toJsonSchema.js.map +0 -1
  59. package/build/enum.d.ts +0 -47
  60. package/build/enum.d.ts.map +0 -1
  61. package/build/enum.js +0 -44
  62. package/build/enum.js.map +0 -1
  63. package/build/enums.d.ts +0 -20
  64. package/build/enums.d.ts.map +0 -1
  65. package/build/enums.js +0 -18
  66. package/build/enums.js.map +0 -1
  67. package/build/findAllWithRegex.d.ts +0 -41
  68. package/build/findAllWithRegex.d.ts.map +0 -1
  69. package/build/findAllWithRegex.js +0 -41
  70. package/build/findAllWithRegex.js.map +0 -1
  71. package/build/flattenObject.d.ts +0 -33
  72. package/build/flattenObject.d.ts.map +0 -1
  73. package/build/flattenObject.js +0 -72
  74. package/build/flattenObject.js.map +0 -1
  75. package/build/fromEntries.d.ts +0 -9
  76. package/build/fromEntries.d.ts.map +0 -1
  77. package/build/fromEntries.js +0 -9
  78. package/build/fromEntries.js.map +0 -1
  79. package/build/getEntries.d.ts +0 -8
  80. package/build/getEntries.d.ts.map +0 -1
  81. package/build/getEntries.js +0 -10
  82. package/build/getEntries.js.map +0 -1
  83. package/build/getKeys.d.ts +0 -14
  84. package/build/getKeys.d.ts.map +0 -1
  85. package/build/getKeys.js +0 -19
  86. package/build/getKeys.js.map +0 -1
  87. package/build/getValues.d.ts +0 -9
  88. package/build/getValues.d.ts.map +0 -1
  89. package/build/getValues.js +0 -9
  90. package/build/getValues.js.map +0 -1
  91. package/build/gql.d.ts +0 -22
  92. package/build/gql.d.ts.map +0 -1
  93. package/build/gql.js +0 -32
  94. package/build/gql.js.map +0 -1
  95. package/build/groupBy.d.ts +0 -11
  96. package/build/groupBy.d.ts.map +0 -1
  97. package/build/groupBy.js +0 -20
  98. package/build/groupBy.js.map +0 -1
  99. package/build/index.d.ts +0 -19
  100. package/build/index.d.ts.map +0 -1
  101. package/build/index.js +0 -19
  102. package/build/index.js.map +0 -1
  103. package/build/invert.d.ts +0 -23
  104. package/build/invert.d.ts.map +0 -1
  105. package/build/invert.js +0 -79
  106. package/build/invert.js.map +0 -1
  107. package/build/noExcess.d.ts +0 -33
  108. package/build/noExcess.d.ts.map +0 -1
  109. package/build/noExcess.js +0 -153
  110. package/build/noExcess.js.map +0 -1
  111. package/build/tests/FixedLengthArray.test.d.ts +0 -2
  112. package/build/tests/FixedLengthArray.test.d.ts.map +0 -1
  113. package/build/tests/FixedLengthArray.test.js +0 -15
  114. package/build/tests/FixedLengthArray.test.js.map +0 -1
  115. package/build/tests/aggregateObjects.test.d.ts +0 -2
  116. package/build/tests/aggregateObjects.test.d.ts.map +0 -1
  117. package/build/tests/aggregateObjects.test.js +0 -98
  118. package/build/tests/aggregateObjects.test.js.map +0 -1
  119. package/build/tests/createDefaultCodec.test.d.ts +0 -2
  120. package/build/tests/createDefaultCodec.test.d.ts.map +0 -1
  121. package/build/tests/createDefaultCodec.test.js +0 -104
  122. package/build/tests/createDefaultCodec.test.js.map +0 -1
  123. package/build/tests/decodeCodec.test.d.ts +0 -2
  124. package/build/tests/decodeCodec.test.d.ts.map +0 -1
  125. package/build/tests/decodeCodec.test.js +0 -43
  126. package/build/tests/decodeCodec.test.js.map +0 -1
  127. package/build/tests/enum.test.d.ts +0 -2
  128. package/build/tests/enum.test.d.ts.map +0 -1
  129. package/build/tests/enum.test.js +0 -21
  130. package/build/tests/enum.test.js.map +0 -1
  131. package/build/tests/flattenObject.test.d.ts +0 -2
  132. package/build/tests/flattenObject.test.d.ts.map +0 -1
  133. package/build/tests/flattenObject.test.js +0 -115
  134. package/build/tests/flattenObject.test.js.map +0 -1
  135. package/build/tests/gql.test.d.ts +0 -2
  136. package/build/tests/gql.test.d.ts.map +0 -1
  137. package/build/tests/gql.test.js +0 -44
  138. package/build/tests/gql.test.js.map +0 -1
  139. package/build/tests/groupBy.test.d.ts +0 -2
  140. package/build/tests/groupBy.test.d.ts.map +0 -1
  141. package/build/tests/groupBy.test.js +0 -13
  142. package/build/tests/groupBy.test.js.map +0 -1
  143. package/build/tests/invert.test.d.ts +0 -2
  144. package/build/tests/invert.test.d.ts.map +0 -1
  145. package/build/tests/invert.test.js +0 -50
  146. package/build/tests/invert.test.js.map +0 -1
  147. package/build/tests/noExcess.test.d.ts +0 -2
  148. package/build/tests/noExcess.test.d.ts.map +0 -1
  149. package/build/tests/noExcess.test.js +0 -65
  150. package/build/tests/noExcess.test.js.map +0 -1
  151. package/build/tests/transposeObjectArray.test.d.ts +0 -2
  152. package/build/tests/transposeObjectArray.test.d.ts.map +0 -1
  153. package/build/tests/transposeObjectArray.test.js +0 -155
  154. package/build/tests/transposeObjectArray.test.js.map +0 -1
  155. package/build/transposeObjectArray.d.ts +0 -67
  156. package/build/transposeObjectArray.d.ts.map +0 -1
  157. package/build/transposeObjectArray.js +0 -39
  158. package/build/transposeObjectArray.js.map +0 -1
  159. package/build/tsbuildinfo +0 -1
  160. package/build/types.d.ts +0 -150
  161. package/build/types.d.ts.map +0 -1
  162. package/build/types.js +0 -2
  163. package/build/types.js.map +0 -1
  164. package/build/valuesOf.d.ts +0 -12
  165. package/build/valuesOf.d.ts.map +0 -1
  166. package/build/valuesOf.js +0 -14
  167. package/build/valuesOf.js.map +0 -1
@@ -0,0 +1,591 @@
1
+ import * as t from "io-ts";
2
+
3
+ //#region src/types.d.ts
4
+ /**
5
+ * An arbitrary object keyed by strings for naming consistency.
6
+ */
7
+ type ObjByString = { [key in string]: any };
8
+ /**
9
+ * An arbitrary function.
10
+ */
11
+ type AnyFunction = (...args: any[]) => any;
12
+ /**
13
+ * An arbitrary array.
14
+ */
15
+ type AnyArray = any[];
16
+ /**
17
+ * The type of the underlying array.
18
+ */
19
+ type ArrType<TData extends AnyArray> = TData extends (infer DataT)[] ? DataT : never;
20
+ /**
21
+ * The type of the underlying promise.
22
+ */
23
+ type PromiseType<TData> = TData extends Promise<infer Result> ? Result : TData;
24
+ /**
25
+ * The type of the underlying array or the identity of the input.
26
+ */
27
+ type ArrOrIdentityType<TData> = TData extends (infer DataT)[] ? DataT : TData;
28
+ /**
29
+ * Helper to create `T` or `T[]`.
30
+ */
31
+ type OrArray<T> = T | T[];
32
+ /**
33
+ * To make the inspected type more tractable than a bunch of intersections.
34
+ */
35
+ type Identity<T> = { [K in keyof T]: T[K] };
36
+ /**
37
+ * Identity but recursive.
38
+ */
39
+ type RecursiveIdentity<T> = T extends AnyArray ? ArrType<T> extends object ? Identity<ArrType<T>>[] : T : T extends string ? T : T extends object ? { [K in keyof T]: T[K] extends object ? Identity<T[K]> : T[K] } : T;
40
+ /**
41
+ * Make selected object keys defined by `K` optional in type `T`.
42
+ */
43
+ type Optionalize<T, K extends keyof T> = Identity<Omit<T, K> & Partial<T>>;
44
+ /**
45
+ * Make selected object keys required in type `T`.
46
+ */
47
+ type Requirize<T, K extends keyof T> = Identity<Omit<T, K> & Required<{ [P in K]: T[P] }>>;
48
+ /**
49
+ * Convert keys of a type to strings.
50
+ */
51
+ type Stringify<T, K extends keyof T> = Omit<T, K> & { [P in keyof T]: string };
52
+ /**
53
+ * Extract string keys from an object.
54
+ */
55
+ type StringKeys<TObj extends ObjByString> = Extract<keyof TObj, string>;
56
+ /**
57
+ * Extract associated values of string keys.
58
+ */
59
+ type StringValues<TObj extends ObjByString> = TObj[keyof TObj];
60
+ /**
61
+ * String keys without extends enforcement.
62
+ */
63
+ type StringKeysSafe<T> = T extends ObjByString ? StringKeys<T> : undefined;
64
+ /**
65
+ * Extract the sub types of an object based on a condition.
66
+ */
67
+ type SubType<Base, Condition> = Pick<Base, { [Key in keyof Base]: Base[Key] extends Condition ? Key : never }[keyof Base]>;
68
+ /**
69
+ * Inverse of `SubType`.
70
+ */
71
+ type SubNotType<Base, Condition> = Pick<Base, { [Key in keyof Base]: Base[Key] extends Condition ? never : Key }[keyof Base]>;
72
+ /**
73
+ * `SubType`, but optional inputs become required.
74
+ */
75
+ type SubTypeRequired<Base, Condition> = SubType<Required<Base>, Condition>;
76
+ /**
77
+ * Names of properties in `T` with types that include `undefined`.
78
+ */
79
+ type OptionalPropertyNames<T> = { [K in keyof T]: undefined extends T[K] ? K : never }[keyof T];
80
+ /**
81
+ * Common properties from `L` and `R` with `undefined` in `R[K]` replaced by `L[K]`.
82
+ */
83
+ type SpreadProperties<L, R, K extends keyof L & keyof R> = { [P in K]: L[P] | Exclude<R[P], undefined> };
84
+ /**
85
+ * Type of `{ ...L, ...R }`, more accurate than `L & R`.
86
+ */
87
+ type Spread<L, R> = Identity<Pick<L, Exclude<keyof L, keyof R>> & Pick<R, Exclude<keyof R, OptionalPropertyNames<R>>> & Pick<R, Exclude<OptionalPropertyNames<R>, keyof L>> & SpreadProperties<L, R, OptionalPropertyNames<R> & keyof L>>;
88
+ /**
89
+ * Soft spread.
90
+ */
91
+ type Merge<L, R> = Identity<Pick<L, Exclude<keyof L, keyof R>> & R>;
92
+ /**
93
+ * Convert unions to intersections.
94
+ */
95
+ type UnionToIntersection<U> = (U extends any ? (argument: U) => void : never) extends ((argument: infer Intersection) => void) ? Intersection : never;
96
+ /**
97
+ * Loop over an object and recursively replace all values.
98
+ */
99
+ type RecursiveTypeReplace<T, TReplace, TReplaceWith> = T extends Promise<infer Result> ? Promise<RecursiveTypeReplace<Result, TReplace, TReplaceWith>> : T extends ((...args: infer Args) => infer ReturnValue) ? (...args: Args) => RecursiveTypeReplace<ReturnValue, TReplace, TReplaceWith> : T extends RegExp ? T : Extract<T, string> extends never ? { [Key in keyof T]: RecursiveTypeReplace<T[Key], TReplace, TReplaceWith> } : Exclude<{ [Key in keyof T]: RecursiveTypeReplace<T[Key], TReplace, TReplaceWith> }, string> | TReplaceWith;
100
+ /**
101
+ * Recursively replace one type in an object.
102
+ */
103
+ type RecursiveObjectReplace<TBase, TReplaceCondition, TReplaceWith> = TBase extends TReplaceCondition ? TReplaceWith : TBase extends (infer Item)[] ? RecursiveObjectReplace<Item, TReplaceCondition, TReplaceWith> : TBase extends object ? { [Key in keyof TBase]: TBase[Key] extends (infer MatrixItem)[][] ? RecursiveObjectReplace<MatrixItem, TReplaceCondition, TReplaceWith>[][] : TBase[Key] extends (infer MatrixItem)[][] | undefined ? RecursiveObjectReplace<MatrixItem, TReplaceCondition, TReplaceWith>[][] | undefined : TBase[Key] extends (infer Item)[] ? RecursiveObjectReplace<Item, TReplaceCondition, TReplaceWith>[] : TBase[Key] extends (infer Item)[] | undefined ? RecursiveObjectReplace<Item, TReplaceCondition, TReplaceWith>[] | undefined : TBase[Key] extends TReplaceCondition ? TReplaceWith : TBase[Key] extends TReplaceCondition | undefined ? TReplaceWith | undefined : RecursiveObjectReplace<TBase[Key], TReplaceCondition, TReplaceWith> } : TBase;
104
+ /**
105
+ * Make values nullable.
106
+ */
107
+ type Nullable<T> = { [K in keyof T]: T[K] | null };
108
+ /**
109
+ * Deep partial of a type.
110
+ */
111
+ type DeepPartial<T> = { [P in keyof T]?: DeepPartial<T[P]> };
112
+ /**
113
+ * Utility type that passes through the interface given that its keys are
114
+ * exactly equal to the keys string union.
115
+ */
116
+ type KeysStrictlyEqual<Keys extends string, Interface extends ([keyof Interface] extends [Keys] ? [Keys] extends [keyof Interface] ? unknown : never : never)> = Interface;
117
+ /**
118
+ * Override fields in `T` with fields in `U`.
119
+ */
120
+ type Override<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
121
+ //#endregion
122
+ //#region src/apply.d.ts
123
+ /**
124
+ * Apply a function to each value of an object while preserving the key types.
125
+ */
126
+ declare function apply<TInput extends ObjByString, TOutput>(obj: TInput, applyFunc: (value: TInput[keyof TInput], key: StringKeys<TInput>, fullObj: typeof obj, index: number) => TOutput): { [key in keyof TInput]: TOutput };
127
+ /**
128
+ * Async version of `apply`.
129
+ */
130
+ declare function asyncApply<TInput extends ObjByString, TOutput>(obj: TInput, applyFunc: (value: TInput[keyof TInput], key: StringKeys<TInput>, fullObj: typeof obj, index: number) => Promise<TOutput>): Promise<{ [key in keyof TInput]: TOutput }>;
131
+ /**
132
+ * Convert a TypeScript enum to a value-to-value map and then call `apply`.
133
+ */
134
+ declare function applyEnum<TEnum extends string, TOutput>(enm: { [key in string]: TEnum }, applyFunc: (value: TEnum, key: TEnum, fullObj: typeof enm, index: number) => TOutput): { [key in TEnum]: TOutput };
135
+ //#endregion
136
+ //#region src/codecTools/decodeCodec.d.ts
137
+ declare const CODEC_ERROR_MESSAGE = "Failed to decode codec:";
138
+ /**
139
+ * Decode a codec, returning the decoded value or throwing an error.
140
+ */
141
+ declare function decodeCodec<TCodec extends t.Any>(codec: TCodec, txt: unknown, parse?: boolean, customErrorFromContext?: ((validationContext: t.Context) => string) | undefined): t.TypeOf<TCodec>;
142
+ //#endregion
143
+ //#region src/codecTools/dictionary.d.ts
144
+ /**
145
+ * A record with optional keys.
146
+ */
147
+ interface DictionaryC<D extends t.Mixed, C extends t.Mixed> extends t.DictionaryType<D, C, { [K in t.TypeOf<D>]?: t.TypeOf<C> }, { [K in t.OutputOf<D>]?: t.OutputOf<C> }, unknown> {}
148
+ /**
149
+ * Helper to encode/decode a record with partial keys.
150
+ */
151
+ declare const dictionary: <D extends t.Mixed, C extends t.Mixed>(keys: D, values: C, name?: string) => DictionaryC<D, C>;
152
+ //#endregion
153
+ //#region src/codecTools/FixedLengthString.d.ts
154
+ /**
155
+ * Brand for strings of fixed length.
156
+ */
157
+ type FixedLengthStringBrand<N extends number> = {
158
+ /** The expected length of the string. */readonly length: N; /** Unique symbol to ensure uniqueness of this type across modules/packages. */
159
+ readonly FixedLengthString: unique symbol;
160
+ };
161
+ /**
162
+ * Codec for strings constrained to a fixed length.
163
+ */
164
+ declare const FixedLengthString: <N extends number>(len: N) => t.BrandC<t.StringC, FixedLengthStringBrand<N>>;
165
+ /**
166
+ * Branded fixed-length string type.
167
+ */
168
+ type FixedLengthString<N extends number> = t.TypeOf<t.BrandC<t.StringC, FixedLengthStringBrand<N>>>;
169
+ //#endregion
170
+ //#region src/codecTools/FixedLengthArray.d.ts
171
+ /**
172
+ * Brand for arrays with bounded length.
173
+ */
174
+ interface FixedLengthArrayBrand<T> extends Array<T> {
175
+ /** Unique symbol to ensure uniqueness of this type across modules/packages. */
176
+ readonly fixedLengthArray: unique symbol;
177
+ /** The minimum length of the array. */
178
+ readonly min: number;
179
+ /** The maximum length of the array. */
180
+ readonly max: number;
181
+ }
182
+ /**
183
+ * Codec for arrays constrained to a fixed length range.
184
+ */
185
+ declare const FixedLengthArray: <C extends t.Mixed>(min: number, max: number, codec: C) => t.BrandC<t.ArrayC<C>, FixedLengthArrayBrand<C>>;
186
+ /**
187
+ * Branded fixed-length array type.
188
+ */
189
+ type FixedLengthArray<C extends t.Mixed> = t.TypeOf<t.BrandC<t.ArrayC<C>, FixedLengthArrayBrand<C>>>;
190
+ //#endregion
191
+ //#region src/codecTools/partialRecord.d.ts
192
+ /**
193
+ * Like `t.record`, but where the keys are all optional to include.
194
+ */
195
+ interface PartialRecordC<D extends t.Mixed, C extends t.Mixed> extends t.DictionaryType<D, C, { [K in t.TypeOf<D>]?: t.TypeOf<C> }, { [K in t.OutputOf<D>]?: t.OutputOf<C> }, unknown> {}
196
+ /**
197
+ * Create an `io-ts` compatible partial record.
198
+ */
199
+ declare const partialRecord: <D extends t.Mixed, C extends t.Mixed>(domain: D, codomain: C, name?: string) => PartialRecordC<D, C>;
200
+ //#endregion
201
+ //#region src/codecTools/isCodecError.d.ts
202
+ /**
203
+ * Checks an error message to see if it is an `io-ts` codec error.
204
+ */
205
+ declare function isCodecError(err: Error): boolean;
206
+ //#endregion
207
+ //#region src/codecTools/NonEmptyString.d.ts
208
+ /**
209
+ * Brand for non-empty strings.
210
+ */
211
+ type NonEmptyStringBrand = {
212
+ /** Unique symbol to ensure uniqueness of this type across modules/packages. */readonly NonEmptyString: symbol;
213
+ };
214
+ /**
215
+ * Codec for non-empty trimmed strings.
216
+ */
217
+ declare const NonEmptyString: t.BrandC<t.StringC, NonEmptyStringBrand>;
218
+ /**
219
+ * Branded non-empty string type.
220
+ */
221
+ type NonEmptyString = t.TypeOf<typeof NonEmptyString>;
222
+ //#endregion
223
+ //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
224
+ // ==================================================================================================
225
+ // JSON Schema Draft 07
226
+ // ==================================================================================================
227
+ // https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
228
+ // --------------------------------------------------------------------------------------------------
229
+ /**
230
+ * Primitive type
231
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
232
+ */
233
+ type JSONSchema7TypeName = "string" //
234
+ | "number" | "integer" | "boolean" | "object" | "array" | "null";
235
+ /**
236
+ * Primitive type
237
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
238
+ */
239
+ type JSONSchema7Type = string //
240
+ | number | boolean | JSONSchema7Object | JSONSchema7Array | null;
241
+ // Workaround for infinite type recursion
242
+ interface JSONSchema7Object {
243
+ [key: string]: JSONSchema7Type;
244
+ }
245
+ // Workaround for infinite type recursion
246
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
247
+ interface JSONSchema7Array extends Array<JSONSchema7Type> {}
248
+ /**
249
+ * Meta schema
250
+ *
251
+ * Recommended values:
252
+ * - 'http://json-schema.org/schema#'
253
+ * - 'http://json-schema.org/hyper-schema#'
254
+ * - 'http://json-schema.org/draft-07/schema#'
255
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
256
+ *
257
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
258
+ */
259
+ type JSONSchema7Version = string;
260
+ /**
261
+ * JSON Schema v7
262
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
263
+ */
264
+ type JSONSchema7Definition = JSONSchema7 | boolean;
265
+ interface JSONSchema7 {
266
+ $id?: string | undefined;
267
+ $ref?: string | undefined;
268
+ $schema?: JSONSchema7Version | undefined;
269
+ $comment?: string | undefined;
270
+ /**
271
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
272
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
273
+ */
274
+ $defs?: {
275
+ [key: string]: JSONSchema7Definition;
276
+ } | undefined;
277
+ /**
278
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
279
+ */
280
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
281
+ enum?: JSONSchema7Type[] | undefined;
282
+ const?: JSONSchema7Type | undefined;
283
+ /**
284
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
285
+ */
286
+ multipleOf?: number | undefined;
287
+ maximum?: number | undefined;
288
+ exclusiveMaximum?: number | undefined;
289
+ minimum?: number | undefined;
290
+ exclusiveMinimum?: number | undefined;
291
+ /**
292
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
293
+ */
294
+ maxLength?: number | undefined;
295
+ minLength?: number | undefined;
296
+ pattern?: string | undefined;
297
+ /**
298
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
299
+ */
300
+ items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
301
+ additionalItems?: JSONSchema7Definition | undefined;
302
+ maxItems?: number | undefined;
303
+ minItems?: number | undefined;
304
+ uniqueItems?: boolean | undefined;
305
+ contains?: JSONSchema7Definition | undefined;
306
+ /**
307
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
308
+ */
309
+ maxProperties?: number | undefined;
310
+ minProperties?: number | undefined;
311
+ required?: string[] | undefined;
312
+ properties?: {
313
+ [key: string]: JSONSchema7Definition;
314
+ } | undefined;
315
+ patternProperties?: {
316
+ [key: string]: JSONSchema7Definition;
317
+ } | undefined;
318
+ additionalProperties?: JSONSchema7Definition | undefined;
319
+ dependencies?: {
320
+ [key: string]: JSONSchema7Definition | string[];
321
+ } | undefined;
322
+ propertyNames?: JSONSchema7Definition | undefined;
323
+ /**
324
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
325
+ */
326
+ if?: JSONSchema7Definition | undefined;
327
+ then?: JSONSchema7Definition | undefined;
328
+ else?: JSONSchema7Definition | undefined;
329
+ /**
330
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
331
+ */
332
+ allOf?: JSONSchema7Definition[] | undefined;
333
+ anyOf?: JSONSchema7Definition[] | undefined;
334
+ oneOf?: JSONSchema7Definition[] | undefined;
335
+ not?: JSONSchema7Definition | undefined;
336
+ /**
337
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
338
+ */
339
+ format?: string | undefined;
340
+ /**
341
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
342
+ */
343
+ contentMediaType?: string | undefined;
344
+ contentEncoding?: string | undefined;
345
+ /**
346
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
347
+ */
348
+ definitions?: {
349
+ [key: string]: JSONSchema7Definition;
350
+ } | undefined;
351
+ /**
352
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
353
+ */
354
+ title?: string | undefined;
355
+ description?: string | undefined;
356
+ default?: JSONSchema7Type | undefined;
357
+ readOnly?: boolean | undefined;
358
+ writeOnly?: boolean | undefined;
359
+ examples?: JSONSchema7Type | undefined;
360
+ }
361
+ //#endregion
362
+ //#region src/codecTools/toJsonSchema.d.ts
363
+ /**
364
+ * Convert an `io-ts` codec to a JSON Schema (v7).
365
+ */
366
+ declare const toJsonSchema: (rawType: any, strict?: boolean, alwaysIncludeRequired?: boolean) => JSONSchema7;
367
+ //#endregion
368
+ //#region src/codecTools/createDefaultCodec.d.ts
369
+ /**
370
+ * Creates a default value for an `io-ts` codec.
371
+ */
372
+ declare const createDefaultCodec: <C extends t.Mixed>(codec: C) => t.TypeOf<C>;
373
+ //#endregion
374
+ //#region src/enum.d.ts
375
+ /**
376
+ * An enumerated value.
377
+ */
378
+ type Enumerate<T = string, TKey extends string = string> = { [key in TKey]: T };
379
+ /**
380
+ * A TypeScript enum with string values.
381
+ */
382
+ type TypescriptEnum = { [key in string]: string } | { [key in number]: string };
383
+ /**
384
+ * An input when defining an enum can be an object of string -> string or a list
385
+ * of strings.
386
+ */
387
+ type EnumInput<T, TKey extends string = string> = Enumerate<T, TKey> | string[];
388
+ /**
389
+ * Convert a list of strings to an enum-like object.
390
+ */
391
+ declare function listToEnum(attributes: string[]): Enumerate<string>;
392
+ /**
393
+ * Merge enum-like inputs into a single enum object.
394
+ */
395
+ declare function createEnum<T = string, TKey extends string = string>(...attributes: EnumInput<T, TKey>[]): Enumerate<T, TKey>;
396
+ /**
397
+ * Filter an enum and return the keys that remain.
398
+ */
399
+ declare function filterEnum<T extends ObjByString>(obj: T, filterFunc: (value: T[keyof T], key: keyof T, calculatedEnum: Enumerate<T[keyof T]>) => boolean): (keyof T)[];
400
+ /**
401
+ * Make an enum compatible with type inference without changing its runtime
402
+ * shape.
403
+ */
404
+ declare function makeEnum<T extends {
405
+ [index: string]: Value | Value[];
406
+ }, Value extends string>(value: T): T;
407
+ //#endregion
408
+ //#region src/enums.d.ts
409
+ /**
410
+ * The HTTP method types.
411
+ */
412
+ declare const HttpMethod: {
413
+ /** A GET request. */Get: "GET"; /** A POST request. */
414
+ Post: "POST"; /** A DELETE request. */
415
+ Delete: "DELETE"; /** A PUT request. */
416
+ Put: "PUT"; /** A PATCH request. */
417
+ Patch: "PATCH";
418
+ };
419
+ /**
420
+ * The HTTP method string union.
421
+ */
422
+ type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
423
+ //#endregion
424
+ //#region src/getEntries.d.ts
425
+ /**
426
+ * `Object.entries` that preserves entry types.
427
+ */
428
+ declare function getEntries<TKey extends keyof TObj, TObj extends ObjByString>(obj: TObj): [TKey, TObj[TKey]][];
429
+ //#endregion
430
+ //#region src/getKeys.d.ts
431
+ /**
432
+ * `Object.keys` for string keys only.
433
+ */
434
+ declare function getStringKeys<T extends object>(obj: T): StringKeys<T>[];
435
+ /**
436
+ * `Object.keys` that preserves key types.
437
+ */
438
+ declare function getKeys<T extends object>(obj: T): (keyof T)[];
439
+ //#endregion
440
+ //#region src/getValues.d.ts
441
+ /**
442
+ * `Object.values` that preserves value types.
443
+ */
444
+ declare function getValues<TValue>(obj: { [key in string | number | symbol]: TValue }): TValue[];
445
+ //#endregion
446
+ //#region src/groupBy.d.ts
447
+ /**
448
+ * A typed version of lodash's `groupBy`.
449
+ */
450
+ declare function groupBy<TItem, TKey>(iterable: TItem[], getKey: (item: TItem) => TKey): Map<TKey, TItem[]>;
451
+ //#endregion
452
+ //#region src/gql.d.ts
453
+ /**
454
+ * Identify whether a string looks like a GraphQL interface/type/input
455
+ * declaration.
456
+ */
457
+ declare const INTERFACE_REGEX: RegExp;
458
+ /**
459
+ * A `gql` is simply a string branded with the associated GraphQL type.
460
+ */
461
+ type Gql<TGraphQLType extends object> = string & {
462
+ /** The TypeScript type definition that relates to the gql string. */graphQLType: TGraphQLType;
463
+ };
464
+ /**
465
+ * Template tag for GraphQL fragments with a small amount of interpolation
466
+ * support for interface bodies.
467
+ */
468
+ declare function gql<TGraphQLType extends object>(strings: TemplateStringsArray, ...expressions: (string | number)[]): Gql<TGraphQLType>;
469
+ //#endregion
470
+ //#region src/invert.d.ts
471
+ /**
472
+ * Invert an object so the values look up the keys. Arrays are expanded and map
473
+ * back to arrays of keys.
474
+ */
475
+ declare function invert<TKey extends string, TValue extends string | string[]>(obj: { [key in TKey]?: TValue }, throwOnDuplicate?: boolean): { [key in TValue extends (infer Item)[] ? Item : TValue]: TValue extends any[] ? TKey[] : TKey };
476
+ /**
477
+ * Safely invert an object into `{ [value]: key[] }`.
478
+ */
479
+ declare function invertSafe<TKey extends string, TValue extends string>(obj: { [key in TKey]: TValue | TValue[] }): { [key in TValue]: TKey[] };
480
+ //#endregion
481
+ //#region src/valuesOf.d.ts
482
+ /**
483
+ * Build an `io-ts` codec over the values of an enum-like object.
484
+ */
485
+ declare function valuesOf<TEnum extends string>(enm: { [key in string]: TEnum }): t.KeyofC<{ [key in TEnum]: unknown }>;
486
+ //#endregion
487
+ //#region src/findAllWithRegex.d.ts
488
+ /**
489
+ * The full match returned when `regex.exec` finds a match.
490
+ */
491
+ interface RegExpMatch {
492
+ /** The full regex match. */
493
+ fullMatch: string;
494
+ /** The index in the text where the match was found. */
495
+ matchIndex: number;
496
+ /** Whether the match satisfies an optional stricter regex. */
497
+ isStrict?: boolean;
498
+ }
499
+ /**
500
+ * Definition for finding all regex matches and mapping capture groups to keys.
501
+ */
502
+ interface FindAllRegExp<TMatchKeys extends string> {
503
+ /** The regex to test. */
504
+ value: RegExp;
505
+ /**
506
+ * A stricter regex used to annotate matches that satisfy a more exact
507
+ * standard.
508
+ */
509
+ strict?: RegExp;
510
+ /** Capture group names mapped by index. */
511
+ matches: readonly TMatchKeys[];
512
+ /** When true, skip validation of matches being the expected length. */
513
+ skipMatchValidation?: boolean;
514
+ }
515
+ /**
516
+ * Use a regex with the global flag to find all matches and return the list with
517
+ * capture groups mapped to named properties.
518
+ */
519
+ declare function findAllWithRegex<TMatchKeys extends string>(regex: FindAllRegExp<TMatchKeys>, text: string): ({ [key in TMatchKeys]: string } & RegExpMatch)[];
520
+ //#endregion
521
+ //#region src/flattenObject.d.ts
522
+ /**
523
+ * Flattens a nested object into a single-level object with concatenated key
524
+ * names.
525
+ */
526
+ declare const flattenObject: ({
527
+ obj,
528
+ prefix
529
+ }: {
530
+ /** The object to flatten. */obj: any; /** The prefix to prepend to keys while recursing. */
531
+ prefix?: string;
532
+ }) => any;
533
+ //#endregion
534
+ //#region src/aggregateObjects.d.ts
535
+ /**
536
+ * Aggregates multiple objects into a single object by combining values of
537
+ * matching keys into comma-separated strings.
538
+ */
539
+ declare const aggregateObjects: ({
540
+ objs,
541
+ wrap
542
+ }: {
543
+ /** The objects to aggregate in a single one. */objs: any[]; /** Whether to wrap the concatenated values in `[]`. */
544
+ wrap?: boolean;
545
+ }) => any;
546
+ //#endregion
547
+ //#region src/transposeObjectArray.d.ts
548
+ /**
549
+ * Type representing a transposed array of objects.
550
+ */
551
+ type TransposedObjectArray<T, K extends keyof T> = { [P in K]: Array<T[P]> } & {
552
+ /** Properties not selected for transposition. */rest: Array<Omit<T, K>>;
553
+ };
554
+ /**
555
+ * Transpose an array of objects by converting selected properties into arrays
556
+ * while keeping the remaining properties grouped in `rest`.
557
+ */
558
+ declare const transposeObjectArray: <T extends object, K extends keyof T>({
559
+ objects,
560
+ properties,
561
+ options
562
+ }: {
563
+ /** Array of objects to transpose. */objects: T[]; /** Property keys to transpose into arrays. */
564
+ properties: K[]; /** Options for how to transpose the array. */
565
+ options?: {
566
+ /** Whether to include non-transposed properties in the final result. */includeOtherProperties?: boolean;
567
+ };
568
+ }) => TransposedObjectArray<T, K>;
569
+ //#endregion
570
+ //#region src/fromEntries.d.ts
571
+ /**
572
+ * `Object.fromEntries` that preserves entry types.
573
+ */
574
+ declare function fromEntries<const TEntries extends ReadonlyArray<readonly [PropertyKey, unknown]>>(entries: TEntries): { [K in TEntries[number] as K[0]]: K[1] };
575
+ //#endregion
576
+ //#region src/noExcess.d.ts
577
+ /**
578
+ * Wrap an `io-ts` codec so validation fails when excess properties are present.
579
+ */
580
+ declare const noExcess: <C extends t.HasProps>(codec: C, name?: string) => NoExcessType<C>;
581
+ /**
582
+ * A wrapper type used with `io-ts` to ensure there are not any excess keys.
583
+ */
584
+ declare class NoExcessType<C extends t.Any, A = C['_A'], O = A, I = unknown> extends t.Type<A, O, I> {
585
+ readonly type: C;
586
+ readonly _tag: "NoExcessType";
587
+ constructor(name: string, is: NoExcessType<C, A, O, I>['is'], validate: NoExcessType<C, A, O, I>['validate'], encode: NoExcessType<C, A, O, I>['encode'], type: C);
588
+ }
589
+ //#endregion
590
+ export { AnyArray, AnyFunction, ArrOrIdentityType, ArrType, CODEC_ERROR_MESSAGE, DeepPartial, DictionaryC, EnumInput, Enumerate, FindAllRegExp, FixedLengthArray, FixedLengthArrayBrand, FixedLengthString, FixedLengthStringBrand, Gql, HttpMethod, INTERFACE_REGEX, Identity, KeysStrictlyEqual, Merge, NoExcessType, NonEmptyString, Nullable, ObjByString, Optionalize, OrArray, Override, PartialRecordC, PromiseType, RecursiveIdentity, RecursiveObjectReplace, RecursiveTypeReplace, RegExpMatch, Requirize, Spread, StringKeys, StringKeysSafe, StringValues, Stringify, SubNotType, SubType, SubTypeRequired, TypescriptEnum, UnionToIntersection, aggregateObjects, apply, applyEnum, asyncApply, createDefaultCodec, createEnum, decodeCodec, dictionary, filterEnum, findAllWithRegex, flattenObject, fromEntries, getEntries, getKeys, getStringKeys, getValues, gql, groupBy, invert, invertSafe, isCodecError, listToEnum, makeEnum, noExcess, partialRecord, toJsonSchema, transposeObjectArray, valuesOf };
591
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":["JSONSchema4TypeName","JSONSchema4Type","JSONSchema4Object","JSONSchema4Array","key","Array","JSONSchema4Version","JSONSchema4","id","$ref","$schema","title","description","default","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","definitions","k","properties","patternProperties","dependencies","enum","type","allOf","anyOf","oneOf","not","extends","format","JSONSchema6TypeName","JSONSchema6Type","JSONSchema6Object","JSONSchema6Array","JSONSchema6Version","JSONSchema6Definition","JSONSchema6","$id","contains","propertyNames","const","examples","JSONSchema7TypeName","JSONSchema7Type","JSONSchema7Object","JSONSchema7Array","JSONSchema7Version","JSONSchema7Definition","JSONSchema7","$comment","$defs","if","then","else","contentMediaType","contentEncoding","readOnly","writeOnly","ValidationResult","ValidationError","valid","errors","property","message","validate","instance","schema","checkPropertyChange","value","mustBeValid","result"],"sources":["../src/types.ts","../src/apply.ts","../src/codecTools/decodeCodec.ts","../src/codecTools/dictionary.ts","../src/codecTools/FixedLengthString.ts","../src/codecTools/FixedLengthArray.ts","../src/codecTools/partialRecord.ts","../src/codecTools/isCodecError.ts","../src/codecTools/NonEmptyString.ts","../../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../src/codecTools/toJsonSchema.ts","../src/codecTools/createDefaultCodec.ts","../src/enum.ts","../src/enums.ts","../src/getEntries.ts","../src/getKeys.ts","../src/getValues.ts","../src/groupBy.ts","../src/gql.ts","../src/invert.ts","../src/valuesOf.ts","../src/findAllWithRegex.ts","../src/flattenObject.ts","../src/aggregateObjects.ts","../src/transposeObjectArray.ts","../src/fromEntries.ts","../src/noExcess.ts"],"x_google_ignoreList":[9],"mappings":";;;;;;KAGY,WAAA;;;AAKZ;KAAY,WAAA,OAAkB,IAAA;;;;KAKlB,QAAA;;;;KAKA,OAAA,eAAsB,QAAA,IAAY,KAAA,2BAAgC,KAAA;AAA9E;;;AAAA,KAKY,WAAA,UAAqB,KAAA,SAAc,OAAA,iBAAwB,MAAA,GAAS,KAAA;;;;KAKpE,iBAAA,UAA2B,KAAA,2BAAgC,KAAA,GAAQ,KAAA;;;;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