From be76dc79a02ef5aa2b2457da196a086552059bb6 Mon Sep 17 00:00:00 2001 From: Fabian Hiller Date: Fri, 30 Aug 2024 14:27:11 +0200 Subject: [PATCH] Change reference prop of action base types to be less strict #799 --- library/CHANGELOG.md | 4 ++++ library/src/types/metadata.ts | 3 ++- library/src/types/transformation.ts | 10 ++++++---- library/src/types/validation.ts | 10 ++++++---- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/library/CHANGELOG.md b/library/CHANGELOG.md index 1f891e149..9c093644e 100644 --- a/library/CHANGELOG.md +++ b/library/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the library will be documented in this file. +## vX.X.X (Month DD, YYYY) + +- Change `reference` property of all action base types to be less strict (issue #799) + ## v0.40.0 (August 29, 2024) - Add `nanoid` action to validate Nano IDs (pull request #789) diff --git a/library/src/types/metadata.ts b/library/src/types/metadata.ts index d3541c4be..507d28ab5 100644 --- a/library/src/types/metadata.ts +++ b/library/src/types/metadata.ts @@ -16,7 +16,8 @@ export interface BaseMetadata { readonly reference: ( // eslint-disable-next-line @typescript-eslint/no-explicit-any ...args: any[] - ) => BaseMetadata; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ) => BaseMetadata; /** * Input, output and issue type. * diff --git a/library/src/types/transformation.ts b/library/src/types/transformation.ts index bdb9e7447..bebc9f5c3 100644 --- a/library/src/types/transformation.ts +++ b/library/src/types/transformation.ts @@ -24,7 +24,8 @@ export interface BaseTransformation< readonly reference: ( // eslint-disable-next-line @typescript-eslint/no-explicit-any ...args: any[] - ) => BaseTransformation; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ) => BaseTransformation>; /** * Whether it's async. */ @@ -72,9 +73,10 @@ export interface BaseTransformationAsync< readonly reference: ( // eslint-disable-next-line @typescript-eslint/no-explicit-any ...args: any[] - ) => - | BaseTransformation - | BaseTransformationAsync; + ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any + | BaseTransformation> + // eslint-disable-next-line @typescript-eslint/no-explicit-any + | BaseTransformationAsync>; /** * Whether it's async. */ diff --git a/library/src/types/validation.ts b/library/src/types/validation.ts index 9a3583733..a64b173ba 100644 --- a/library/src/types/validation.ts +++ b/library/src/types/validation.ts @@ -24,7 +24,8 @@ export interface BaseValidation< readonly reference: ( // eslint-disable-next-line @typescript-eslint/no-explicit-any ...args: any[] - ) => BaseValidation; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ) => BaseValidation>; /** * The expected property. */ @@ -76,9 +77,10 @@ export interface BaseValidationAsync< readonly reference: ( // eslint-disable-next-line @typescript-eslint/no-explicit-any ...args: any[] - ) => - | BaseValidation - | BaseValidationAsync; + ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any + | BaseValidation> + // eslint-disable-next-line @typescript-eslint/no-explicit-any + | BaseValidationAsync>; /** * Whether it's async. */