From 4407656df1d2b02826611e622b978375c66bbd52 Mon Sep 17 00:00:00 2001 From: Evyatar Date: Mon, 29 Jan 2024 23:54:29 +0200 Subject: [PATCH] types(vest): Export StaticSuite type --- packages/vest/src/suite/staticSuite.ts | 12 ++++++------ packages/vest/src/vest.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/vest/src/suite/staticSuite.ts b/packages/vest/src/suite/staticSuite.ts index 5a6e80df9..126141789 100644 --- a/packages/vest/src/suite/staticSuite.ts +++ b/packages/vest/src/suite/staticSuite.ts @@ -25,7 +25,7 @@ import { TTypedMethods, getTypedMethods } from 'getTypedMethods'; export function staticSuite< F extends TFieldName = string, G extends TGroupName = string, - T extends CB = CB + T extends CB = CB, >(suiteCallback: T): StaticSuite { return assign( (...args: Parameters) => { @@ -38,20 +38,20 @@ export function staticSuite< { dump: suite.dump, }, - result - ) + result, + ), ); }, { ...getTypedMethods(), - } + }, ); } -type StaticSuite< +export type StaticSuite< F extends TFieldName = string, G extends TGroupName = string, - T extends CB = CB + T extends CB = CB, > = ((...args: Parameters) => SuiteRunResult & { dump: CB; }) & diff --git a/packages/vest/src/vest.ts b/packages/vest/src/vest.ts index b6c05e954..e09f318c6 100644 --- a/packages/vest/src/vest.ts +++ b/packages/vest/src/vest.ts @@ -16,7 +16,7 @@ import { include } from 'include'; import { mode } from 'mode'; import { omitWhen } from 'omitWhen'; import { skipWhen } from 'skipWhen'; -import { staticSuite } from 'staticSuite'; +import { staticSuite, StaticSuite } from 'staticSuite'; import { suiteSelectors } from 'suiteSelectors'; import { test } from 'test'; import { warn } from 'warn'; @@ -40,4 +40,4 @@ export { Modes, }; -export type { SuiteResult, SuiteRunResult, SuiteSummary, Suite }; +export type { SuiteResult, SuiteRunResult, SuiteSummary, Suite, StaticSuite };