expect-webdriverio 4.2.1 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
- # expect-webdriverio
1
+ # expect-webdriverio [![Test](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml/badge.svg)](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml)
2
2
 
3
- [![Test](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml/badge.svg)](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml)
4
3
 
5
4
  ###### [API](docs/API.md) | [TypeScript / JS Autocomplete](/docs/Types.md) | [Examples](docs/Examples.md) | [Extending Matchers](/docs/Extend.md)
6
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expect-webdriverio",
3
- "version": "4.2.1",
3
+ "version": "4.2.3",
4
4
  "author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
5
5
  "description": "WebdriverIO Assertion Library",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  declare namespace ExpectWebdriverIO {
2
- function expect<T extends Promise<void>>(actual: T): Matchers<T, T>
2
+ function expect<T = unknown, R extends void | Promise<void> = void | Promise<void>>(actual: T): Matchers<R, T>
3
3
  function setOptions(options: DefaultOptions): void
4
4
 
5
5
  interface DefaultOptions {
@@ -2,17 +2,16 @@
2
2
 
3
3
  type ChainablePromiseElement = import('webdriverio').ChainablePromiseElement<WebdriverIO.Element>
4
4
  type ChainablePromiseArray = import('webdriverio').ChainablePromiseArray<WebdriverIO.Element>
5
- type ExpectType = WebdriverIO.Element | Promise<WebdriverIO.Element> | ChainablePromiseElement | ChainablePromiseArray
6
5
 
7
6
  declare namespace ExpectWebdriverIO {
8
- interface Matchers<R extends Promise<void>, T> extends Readonly<import('expect').Matchers<R>> {
7
+ interface Matchers<R extends void | Promise<void>, T> extends Readonly<import('expect').Matchers<R>> {
9
8
  not: Matchers<R, T>
10
9
  resolves: Matchers<R, T>
11
10
  rejects: Matchers<R, T>
12
11
  }
13
12
 
14
13
  type Expect = {
15
- <T extends ExpectType, R extends Promise<void>>(actual: T): Matchers<R, T>
14
+ <T = unknown, R extends void | Promise<void> = void | Promise<void>>(actual: T): Matchers<R, T>
16
15
  extend(map: Record<string, Function>): void
17
16
  } & AsymmetricMatchers
18
17