diff --git a/types/index.d.ts b/types/index.d.ts index 4ecf20a6..ae6f96c4 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -28,7 +28,7 @@ declare namespace jest { * Use .toBeOneOf when checking if a value is a member of a given Array. * @param {Array.<*>} members */ - toBeOneOf(members: readonly E[]): R; + toBeOneOf(members: readonly E[]): R; /** * Use `.toBeNil` when checking a value is `null` or `undefined`. @@ -39,7 +39,7 @@ declare namespace jest { * Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`. * @param {Function} predicate */ - toSatisfy(predicate: (x: E) => boolean): R; + toSatisfy(predicate: (x: E) => boolean): R; /** * Use `.toBeArray` when checking if a value is an `Array`. @@ -68,43 +68,43 @@ declare namespace jest { * Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set. * @param {Array.<*>} members */ - toIncludeAllMembers(members: readonly E[]): R; + toIncludeAllMembers(members: readonly E[]): R; /** * Use `.toIncludeAllPartialMembers` when checking if an `Array` contains all of the same partial members of a given set. * @param {Array.<*>} members */ - toIncludeAllPartialMembers(members: readonly E[]): R; + toIncludeAllPartialMembers(members: readonly E[]): R; /** * Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set. * @param {Array.<*>} members */ - toIncludeAnyMembers(members: readonly E[]): R; + toIncludeAnyMembers(members: readonly E[]): R; /** * Use `.toIncludeSameMembers` when checking if two arrays contain equal values, in any order. * @param {Array.<*>} members */ - toIncludeSameMembers(members: readonly E[]): R; + toIncludeSameMembers(members: readonly E[]): R; /** * Use `.toPartiallyContain` when checking if any array value matches the partial member. * @param {*} member */ - toPartiallyContain(member: E): R; + toPartiallyContain(member: E): R; /** * Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array. * @param {Function} predicate */ - toSatisfyAll(predicate: (x: E) => boolean): R; + toSatisfyAll(predicate: (x: E) => boolean): R; /** * Use `.toSatisfyAny` when you want to use a custom matcher by supplying a predicate function that returns `true` for any matching value in an array. * @param {Function} predicate */ - toSatisfyAny(predicate: (x: any) => boolean): R; + toSatisfyAny(predicate: (x: unknown) => boolean): R; /** * Use `.toBeBoolean` when checking if a value is a `Boolean`. @@ -229,84 +229,84 @@ declare namespace jest { * * @param {String} key */ - toContainKey(key: keyof E | string): R; + toContainKey(key: keyof E | string): R; /** * Use `.toContainKeys` when checking if an object has all of the provided keys. * * @param {Array.} keys */ - toContainKeys(keys: readonly (keyof E | string)[]): R; + toContainKeys(keys: readonly (keyof E | string)[]): R; /** * Use `.toContainAllKeys` when checking if an object only contains all of the provided keys. * * @param {Array.} keys */ - toContainAllKeys(keys: readonly (keyof E | string)[]): R; + toContainAllKeys(keys: readonly (keyof E | string)[]): R; /** * Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys. * * @param {Array.} keys */ - toContainAnyKeys(keys: readonly (keyof E | string)[]): R; + toContainAnyKeys(keys: readonly (keyof E | string)[]): R; /** * Use `.toContainValue` when checking if an object contains the provided value. * * @param {*} value */ - toContainValue(value: E): R; + toContainValue(value: E): R; /** * Use `.toContainValues` when checking if an object contains all of the provided values. * * @param {Array.<*>} values */ - toContainValues(values: readonly E[]): R; + toContainValues(values: readonly E[]): R; /** * Use `.toContainAllValues` when checking if an object only contains all of the provided values. * * @param {Array.<*>} values */ - toContainAllValues(values: readonly E[]): R; + toContainAllValues(values: readonly E[]): R; /** * Use `.toContainAnyValues` when checking if an object contains at least one of the provided values. * * @param {Array.<*>} values */ - toContainAnyValues(values: readonly E[]): R; + toContainAnyValues(values: readonly E[]): R; /** * Use `.toContainEntry` when checking if an object contains the provided entry. * * @param {Array.} entry */ - toContainEntry(entry: readonly [keyof E, E[keyof E]]): R; + toContainEntry(entry: readonly [keyof E, E[keyof E]]): R; /** * Use `.toContainEntries` when checking if an object contains all of the provided entries. * * @param {Array.>} entries */ - toContainEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; + toContainEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; /** * Use `.toContainAllEntries` when checking if an object only contains all of the provided entries. * * @param {Array.>} entries */ - toContainAllEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; + toContainAllEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; /** * Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries. * * @param {Array.>} entries */ - toContainAnyEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; + toContainAnyEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): R; /** * Use `.toBeExtensible` when checking if an object is extensible. @@ -459,7 +459,7 @@ declare namespace jest { * Use .toBeOneOf when checking if a value is a member of a given Array. * @param {Array.<*>} members */ - toBeOneOf(members: readonly E[]): any; + toBeOneOf(members: readonly E[]): any; /** * Use `.toBeNil` when checking a value is `null` or `undefined`. @@ -470,7 +470,7 @@ declare namespace jest { * Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`. * @param {Function} predicate */ - toSatisfy(predicate: (x: E) => boolean): any; + toSatisfy(predicate: (x: E) => boolean): any; /** * Use `.toBeArray` when checking if a value is an `Array`. @@ -499,31 +499,31 @@ declare namespace jest { * Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set. * @param {Array.<*>} members */ - toIncludeAllMembers(members: readonly E[]): any; + toIncludeAllMembers(members: readonly E[]): any; /** * Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set. * @param {Array.<*>} members */ - toIncludeAnyMembers(members: readonly E[]): any; + toIncludeAnyMembers(members: readonly E[]): any; /** * Use `.toIncludeSameMembers` when checking if two arrays contain equal values, in any order. * @param {Array.<*>} members */ - toIncludeSameMembers(members: readonly E[]): any; + toIncludeSameMembers(members: readonly E[]): any; /** * Use `.toPartiallyContain` when checking if any array value matches the partial member. * @param {*} member */ - toPartiallyContain(member: E): any; + toPartiallyContain(member: E): any; /** * Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array. * @param {Function} predicate */ - toSatisfyAll(predicate: (x: E) => boolean): any; + toSatisfyAll(predicate: (x: E) => boolean): any; /** * Use `.toSatisfyAny` when you want to use a custom matcher by supplying a predicate function that returns `true` for any matching value in an array. @@ -656,77 +656,77 @@ declare namespace jest { * * @param {Array.} keys */ - toContainKeys(keys: readonly (keyof E | string)[]): any; + toContainKeys(keys: readonly (keyof E | string)[]): any; /** * Use `.toContainAllKeys` when checking if an object only contains all of the provided keys. * * @param {Array.} keys */ - toContainAllKeys(keys: readonly (keyof E | string)[]): any; + toContainAllKeys(keys: readonly (keyof E | string)[]): any; /** * Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys. * * @param {Array.} keys */ - toContainAnyKeys(keys: readonly (keyof E | string)[]): any; + toContainAnyKeys(keys: readonly (keyof E | string)[]): any; /** * Use `.toContainValue` when checking if an object contains the provided value. * * @param {*} value */ - toContainValue(value: E): any; + toContainValue(value: E): any; /** * Use `.toContainValues` when checking if an object contains all of the provided values. * * @param {Array.<*>} values */ - toContainValues(values: readonly E[]): any; + toContainValues(values: readonly E[]): any; /** * Use `.toContainAllValues` when checking if an object only contains all of the provided values. * * @param {Array.<*>} values */ - toContainAllValues(values: readonly E[]): any; + toContainAllValues(values: readonly E[]): any; /** * Use `.toContainAnyValues` when checking if an object contains at least one of the provided values. * * @param {Array.<*>} values */ - toContainAnyValues(values: readonly E[]): any; + toContainAnyValues(values: readonly E[]): any; /** * Use `.toContainEntry` when checking if an object contains the provided entry. * * @param {Array.<[keyof E, E[keyof E]>} entry */ - toContainEntry(entry: readonly [keyof E, E[keyof E]]): any; + toContainEntry(entry: readonly [keyof E, E[keyof E]]): any; /** * Use `.toContainEntries` when checking if an object contains all of the provided entries. * * @param {Array.>} entries */ - toContainEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; + toContainEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; /** * Use `.toContainAllEntries` when checking if an object only contains all of the provided entries. * * @param {Array.>} entries */ - toContainAllEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; + toContainAllEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; /** * Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries. * * @param {Array.>} entries */ - toContainAnyEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; + toContainAnyEntries(entries: readonly (readonly [keyof E, E[keyof E]])[]): any; /** * Use `.toBeExtensible` when checking if an object is extensible.