@sinclair/typebox 0.28.6 → 0.28.7
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.
- package/package.json +1 -1
- package/readme.md +1 -1
- package/typebox.d.ts +1 -1
- package/typebox.js +2 -1
package/package.json
CHANGED
package/readme.md
CHANGED
package/typebox.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, In
|
|
|
203
203
|
allOf: [...T];
|
|
204
204
|
}
|
|
205
205
|
export type TKeyOfProperties<T extends TSchema> = Static<T> extends infer S ? UnionToTuple<{
|
|
206
|
-
[K in keyof S]: TLiteral
|
|
206
|
+
[K in keyof S]: TLiteral<Assert<K, TLiteralValue>>;
|
|
207
207
|
}[keyof S]> : [];
|
|
208
208
|
export type TKeyOfIndicesArray<T extends TSchema[]> = UnionToTuple<keyof T & `${number}`>;
|
|
209
209
|
export type TKeyOfIndices<T extends TSchema[]> = AssertRest<TKeyOfIndicesArray<T> extends infer R ? {
|
package/typebox.js
CHANGED
|
@@ -1440,7 +1440,8 @@ var IndexedAccessor;
|
|
|
1440
1440
|
return exports.Type.Never();
|
|
1441
1441
|
}
|
|
1442
1442
|
function Resolve(schema, keys, options = {}) {
|
|
1443
|
-
|
|
1443
|
+
// prettier-ignore
|
|
1444
|
+
return exports.Type.Union(keys.map((key) => Visit(schema, key.toString())), options);
|
|
1444
1445
|
}
|
|
1445
1446
|
IndexedAccessor.Resolve = Resolve;
|
|
1446
1447
|
})(IndexedAccessor = exports.IndexedAccessor || (exports.IndexedAccessor = {}));
|