Skip to content

Commit

Permalink
Revision 0.31.25 (#666)
Browse files Browse the repository at this point in the history
* Github Rendering Fix

* Resolve Iterators

* Version
  • Loading branch information
sinclairzx81 authored Nov 15, 2023
1 parent 9cb7b02 commit 5bd9f12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/typebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export interface TArray<T extends TSchema = TSchema> extends TSchema, ArrayOptio
// --------------------------------------------------------------------------
// TAsyncIterator
// --------------------------------------------------------------------------
export type TAsyncIteratorResolve<T extends TSchema, P extends unknown[]> = Ensure<AsyncIterableIterator<Static<T, P>>>
export type TAsyncIteratorResolve<T extends TSchema, P extends unknown[]> = AsyncIterableIterator<Ensure<Static<T, P>>>
export interface TAsyncIterator<T extends TSchema = TSchema> extends TSchema {
[Kind]: 'AsyncIterator'
static: TAsyncIteratorResolve<T, this['params']>
Expand Down Expand Up @@ -477,7 +477,7 @@ export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, In
// --------------------------------------------------------------------------
// TIterator
// --------------------------------------------------------------------------
export type TIteratorResolve<T extends TSchema, P extends unknown[]> = Ensure<IterableIterator<Static<T, P>>>
export type TIteratorResolve<T extends TSchema, P extends unknown[]> = IterableIterator<Ensure<Static<T, P>>>
export interface TIterator<T extends TSchema = TSchema> extends TSchema {
[Kind]: 'Iterator'
static: TIteratorResolve<T, this['params']>
Expand Down Expand Up @@ -858,13 +858,13 @@ export type TTemplateLiteralConst<T, Acc extends string> =
T extends TBoolean ? `${boolean}` :
never
// prettier-ignore
export type TTemplateLiteralUnion<T extends TTemplateLiteralKind[], Acc extends string = ''> =
export type TTemplateLiteralUnion<T extends TTemplateLiteralKind[], Acc extends string> =
T extends [infer L, ...infer R] ? `${TTemplateLiteralConst<L, Acc>}${TTemplateLiteralUnion<Assert<R, TTemplateLiteralKind[]>, Acc>}` :
Acc
export type TTemplateLiteralKeyRest<T extends TTemplateLiteral> = Assert<UnionToTuple<Static<T>>, TPropertyKey[]>
export interface TTemplateLiteral<T extends TTemplateLiteralKind[] = TTemplateLiteralKind[]> extends TSchema {
[Kind]: 'TemplateLiteral'
static: TTemplateLiteralUnion<T>
static: TTemplateLiteralUnion<T, ''>
type: 'string'
pattern: string // todo: it may be possible to infer this pattern
}
Expand Down

0 comments on commit 5bd9f12

Please sign in to comment.