Skip to content

Commit

Permalink
Fix type of pipe argument at intersect schema
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Jan 19, 2024
1 parent 7fffd84 commit c011cd6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 8 additions & 4 deletions library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

All notable changes to the library will be documented in this file.

## vX.X.X (Month DD, YYYY)

- Fix type of `pipe` argument at `intersect` and `intersectAsync` schema

## v0.26.0 (January 16, 2023)

- Improve performance of `enum_` and `enumAsync` schema by caching values
- Change ISO timestamp regex to support timestamps with lower and higher millisecond accuracy (pull request #353)
- Change issue handling of `union`, `unionAsync`, `variant` and `variantAsync` to improve developer experience
- Fix bug in `getDefaults`, `getDefaultsAsync`, `getFallbacks` and `getFallbacksAsync` for falsy but not `undefined` values (issue #356)
- Fix type of `pipe` argument at `union`, `unionAsync`, `variant` and `variantAsync`
- Fix bug that broke pipeline execution in `union`, `unionAsync`, `variant` and `variantAsync` (issue #364)
- Change issue handling of `union`, `unionAsync`, `variant` and `variantAsync` schema to improve developer experience
- Fix bug in `getDefaults`, `getDefaultsAsync`, `getFallbacks` and `getFallbacksAsync` schema for falsy but not `undefined` values (issue #356)
- Fix type of `pipe` argument at `union`, `unionAsync`, `variant` and `variantAsync` schema
- Fix bug that broke pipeline execution in `union`, `unionAsync`, `variant` and `variantAsync` schema (issue #364)
- Fix typo in type name of `startsWith` validation action (pull request #375)

## v0.25.0 (December 26, 2023)
Expand Down
10 changes: 5 additions & 5 deletions library/src/schemas/intersect/intersect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type IntersectSchema<
/**
* The validation and transformation pipeline.
*/
pipe: Pipe<IntersectInput<TOptions>> | undefined;
pipe: Pipe<IntersectOutput<TOptions>> | undefined;
};

/**
Expand All @@ -56,7 +56,7 @@ export type IntersectSchema<
*/
export function intersect<TOptions extends IntersectOptions>(
options: TOptions,
pipe?: Pipe<IntersectInput<TOptions>>
pipe?: Pipe<IntersectOutput<TOptions>>
): IntersectSchema<TOptions>;

/**
Expand All @@ -71,13 +71,13 @@ export function intersect<TOptions extends IntersectOptions>(
export function intersect<TOptions extends IntersectOptions>(
options: TOptions,
message?: ErrorMessage,
pipe?: Pipe<IntersectInput<TOptions>>
pipe?: Pipe<IntersectOutput<TOptions>>
): IntersectSchema<TOptions>;

export function intersect<TOptions extends IntersectOptions>(
options: TOptions,
arg2?: Pipe<IntersectInput<TOptions>> | ErrorMessage,
arg3?: Pipe<IntersectInput<TOptions>>
arg2?: Pipe<IntersectOutput<TOptions>> | ErrorMessage,
arg3?: Pipe<IntersectOutput<TOptions>>
): IntersectSchema<TOptions> {
// Get message and pipe argument
const [message = 'Invalid type', pipe] = defaultArgs(arg2, arg3);
Expand Down

0 comments on commit c011cd6

Please sign in to comment.