From 5bd9f12eb16cbede35a3ec7f9d4d325e4aee04a1 Mon Sep 17 00:00:00 2001 From: sinclairzx81 Date: Wed, 15 Nov 2023 22:43:37 +0900 Subject: [PATCH] Revision 0.31.25 (#666) * Github Rendering Fix * Resolve Iterators * Version --- package-lock.json | 4 ++-- package.json | 2 +- src/typebox.ts | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 184112058..79a891d45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sinclair/typebox", - "version": "0.31.24", + "version": "0.31.25", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sinclair/typebox", - "version": "0.31.24", + "version": "0.31.25", "license": "MIT", "devDependencies": { "@sinclair/hammer": "^0.18.0", diff --git a/package.json b/package.json index 471eb0a1a..62752db56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sinclair/typebox", - "version": "0.31.24", + "version": "0.31.25", "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", "keywords": [ "typescript", diff --git a/src/typebox.ts b/src/typebox.ts index 9afde820d..aef60231f 100644 --- a/src/typebox.ts +++ b/src/typebox.ts @@ -242,7 +242,7 @@ export interface TArray extends TSchema, ArrayOptio // -------------------------------------------------------------------------- // TAsyncIterator // -------------------------------------------------------------------------- -export type TAsyncIteratorResolve = Ensure>> +export type TAsyncIteratorResolve = AsyncIterableIterator>> export interface TAsyncIterator extends TSchema { [Kind]: 'AsyncIterator' static: TAsyncIteratorResolve @@ -477,7 +477,7 @@ export interface TIntersect extends TSchema, In // -------------------------------------------------------------------------- // TIterator // -------------------------------------------------------------------------- -export type TIteratorResolve = Ensure>> +export type TIteratorResolve = IterableIterator>> export interface TIterator extends TSchema { [Kind]: 'Iterator' static: TIteratorResolve @@ -858,13 +858,13 @@ export type TTemplateLiteralConst = T extends TBoolean ? `${boolean}` : never // prettier-ignore -export type TTemplateLiteralUnion = +export type TTemplateLiteralUnion = T extends [infer L, ...infer R] ? `${TTemplateLiteralConst}${TTemplateLiteralUnion, Acc>}` : Acc export type TTemplateLiteralKeyRest = Assert>, TPropertyKey[]> export interface TTemplateLiteral extends TSchema { [Kind]: 'TemplateLiteral' - static: TTemplateLiteralUnion + static: TTemplateLiteralUnion type: 'string' pattern: string // todo: it may be possible to infer this pattern }