Skip to content

Commit 6de45fd

Browse files
authored
Version 1.1.31 (#1585)
* Deprecation Notice for Awaited, Promise, Iterator and AsyncIterator * ChangeLog * Version
1 parent c4bac32 commit 6de45fd

6 files changed

Lines changed: 23 additions & 5 deletions

File tree

changelog/1.1.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
---
44

55
### Version Updates
6+
- [Revision 1.1.31](https://github.com/sinclairzx81/typebox/pull/1585)
7+
- Flag Awaited, Promise, Iterator and AsyncIterator for Deprecation
68
- [Revision 1.1.30](https://github.com/sinclairzx81/typebox/pull/1584)
79
- Support Recursive Indexed This
810
- [Revision 1.1.29](https://github.com/sinclairzx81/typebox/pull/1583)

src/type/action/awaited.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ export function AwaitedDeferred<Type extends TSchema>(type: Type, options: TSche
5050
export type TAwaited<Type extends TSchema> = (
5151
TAwaitedAction<Type>
5252
)
53-
/** Applies an Awaited action to a type. */
53+
/**
54+
* Applies an Awaited action to a type.
55+
*
56+
* @deprecated This action is being removed in the next version of TypeBox.
57+
*/
5458
export function Awaited<Type extends TSchema>(type: Type, options: TSchemaOptions = {}): TAwaited<Type> {
5559
return AwaitedAction(type, options)
5660
}

src/type/types/async-iterator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export interface TAsyncIterator<Type extends TSchema = TSchema> extends TSchema
5151
// ------------------------------------------------------------------
5252
// Factory
5353
// ------------------------------------------------------------------
54-
/** Creates a AsyncIterator type. */
54+
/**
55+
* Creates a AsyncIterator type.
56+
*
57+
* @deprecated This type is being removed in the next version of TypeBox. A fallback will be provided under examples.
58+
*/
5559
export function AsyncIterator<Type extends TSchema>(iteratorItems: Type, options?: TSchemaOptions): TAsyncIterator<Type> {
5660
return Memory.Create({ '~kind': 'AsyncIterator' }, { type: 'asyncIterator', iteratorItems }, options) as never
5761
}

src/type/types/iterator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export interface TIterator<Type extends TSchema = TSchema> extends TSchema {
5151
// ------------------------------------------------------------------
5252
// Factory
5353
// ------------------------------------------------------------------
54-
/** Creates a Iterator type. */
54+
/**
55+
* Creates a Iterator type.
56+
*
57+
* @deprecated This type is being removed in the next version of TypeBox. A fallback will be provided under examples.
58+
*/
5559
export function Iterator<Type extends TSchema>(iteratorItems: Type, options?: TSchemaOptions): TIterator<Type> {
5660
return Memory.Create({ '~kind': 'Iterator' }, { type: 'iterator', iteratorItems }, options) as never
5761
}

src/type/types/promise.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export interface TPromise<Type extends TSchema = TSchema> extends TSchema {
5151
// ------------------------------------------------------------------
5252
// Factory
5353
// ------------------------------------------------------------------
54-
/** Creates a Promise type. */
54+
/**
55+
* Creates a Promise type.
56+
*
57+
* @deprecated This type is being removed in the next version of TypeBox. A fallback will be provided under examples.
58+
*/
5559
export function _Promise_<Type extends TSchema>(item: Type, options?: TSchemaOptions): TPromise<Type> {
5660
return Memory.Create({ ['~kind']: 'Promise' }, { type: 'promise', item }, options) as never
5761
}

tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Metrics } from './task/metrics/index.ts'
99
import { Spec } from './task/spec/index.ts'
1010
import { Task } from 'tasksmith'
1111

12-
const Version = '1.1.30'
12+
const Version = '1.1.31'
1313

1414
// ------------------------------------------------------------------
1515
// Build

0 commit comments

Comments
 (0)