From 38b01b7528b3b8041048d4f2e5e9dc0de0b2abf3 Mon Sep 17 00:00:00 2001 From: Jamie Rolfs Date: Mon, 2 May 2022 12:09:59 -0700 Subject: [PATCH] refactor: derive configuration options type for Testing Library types --- lib/typedefs.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/typedefs.ts b/lib/typedefs.ts index 9fcc5c7..1a9853c 100644 --- a/lib/typedefs.ts +++ b/lib/typedefs.ts @@ -1,6 +1,7 @@ import { Matcher, ByRoleOptions as TestingLibraryByRoleOptions, + Config as TestingLibraryConfig, MatcherOptions as TestingLibraryMatcherOptions, SelectorMatcherOptions as TestingLibrarySelectorMatcherOptions, waitForOptions, @@ -189,7 +190,7 @@ export interface Queries extends QueryMethods { getNodeText(el: Element): Promise } -export interface ConfigurationOptions { - testIdAttribute: string - asyncUtilTimeout: number -} +export type ConfigurationOptions = Pick< + TestingLibraryConfig, + 'testIdAttribute' | 'asyncUtilTimeout' +>