Skip to content

Commit

Permalink
refactor(Stream): deprecate DynamicTuple
Browse files Browse the repository at this point in the history
  • Loading branch information
dilame authored and gcanti committed Jul 5, 2024
1 parent dcc2040 commit 443bb74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/stream-tuple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

refactor(Stream): use new built-in `Types.TupleOf` instead of `Stream.DynamicTuple` and deprecate it
2 changes: 2 additions & 0 deletions packages/effect/src/Stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,15 @@ export declare namespace Stream {
/**
* @since 2.0.0
* @category models
* @deprecated use Types.TupleOf instead
*/
export type DynamicTuple<T, N extends number> = N extends N ? number extends N ? Array<T> : DynamicTupleOf<T, N, []>
: never

/**
* @since 2.0.0
* @category models
* @deprecated use Types.TupleOf instead
*/
export type DynamicTupleOf<T, N extends number, R extends Array<unknown>> = R["length"] extends N ? R
: DynamicTupleOf<T, N, [T, ...R]>
Expand Down

0 comments on commit 443bb74

Please sign in to comment.