jest-expect-message icon indicating copy to clipboard operation
jest-expect-message copied to clipboard

Fix return type to include 'resolves', 'rejects', and 'not' properties

Open BenjaminSchwendner opened this issue 1 year ago • 0 comments

What

Changing the return type in the TypeScript declaration to be JestMatchers<T>.

Why

This is in line with the original type declaration in @types/jest: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/c3924fd0016c953e1c4440f102436694442b7a57/types/jest/index.d.ts#L626

With this type the return type will then also include the resolves, rejects and not properties, which would not be included when using the Matchers<T> return type.

Notes

Housekeeping

  • [ ] Unit tests
  • [ ] Documentation is up to date
  • [ ] No additional lint warnings

BenjaminSchwendner avatar Sep 19 '22 16:09 BenjaminSchwendner