@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.28.6",
3
+ "version": "0.28.7",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
package/readme.md CHANGED
@@ -959,7 +959,7 @@ type T = Static<typeof T> // type T = 'A' | 'B' | 'C'
959
959
 
960
960
  <a name='types-guards'></a>
961
961
 
962
- ### Type Gaurds
962
+ ### Type Guards
963
963
 
964
964
  TypeBox provides a `TypeGuard` module that can be used for reflection and asserting values as types.
965
965
 
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<`${Assert<K, TLiteralValue>}`>;
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
- return exports.Type.Union(keys.map((key) => Visit(schema, key.toString())));
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 = {}));