11/// <reference types="../types/expect-webdriverio.d.ts" />
22import { expect as expectLib } from 'expect'
3- import type { WdioMatchersObject , RawMatcherFn } from './types.js'
3+ import type { RawMatcherFn } from './types.js'
44import * as wdioMatchers from './matchers.js'
55import { DEFAULT_OPTIONS , defaultOptionsList } from './constants.js'
66import createSoftExpect from './softExpect.js'
@@ -9,14 +9,14 @@ import { SoftAssertService } from './softAssert.js'
99/**
1010 * Contains only the custom WDIO matchers to be used with `expect.extend()`.
1111 */
12- export const wdioCustomMatchers : WdioMatchersObject = { }
12+ export const wdioCustomMatchers : MatchersObject = { }
1313
1414/**
1515 * @deprecated use `wdioCustomMatchers` instead
1616 */
1717export const matchers = new Map < string , RawMatcherFn > ( )
1818
19- const filteredMatchers : WdioMatchersObject = { }
19+ const filteredMatchers : MatchersObject = { }
2020const extend = expectLib . extend
2121
2222// filter out matchers that aren't a function
@@ -38,9 +38,7 @@ expectLib.extend = (m) => {
3838 return extend ( m )
3939}
4040
41- type MatchersObject = Parameters < typeof expectLib . extend > [ 0 ]
42-
43- expectLib . extend ( filteredMatchers as MatchersObject )
41+ expectLib . extend ( filteredMatchers )
4442
4543// Extend the expect object with soft assertions
4644const expectWithSoft = expectLib as unknown as ExpectWebdriverIO . Expect
0 commit comments