Skip to content

Commit

Permalink
fix: add docs to satisfy() (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
unional authored Nov 24, 2017
1 parent 4d1e797 commit 786c850
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/satisfy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ export type SatisfyExpected<T> = {
[P in keyof T]: Partial<SatisfyExpected<T[P]>> | RegExp | Function
}

/**
* Check if `actual` satisfies criteria in `expected`.
* @param expected All properties can be a value which will be compared to the same property in `actual`, RegExp, or a predicate function that will be used to check against the property.
*/
export function satisfy<
Actual,
Expected extends Partial<SatisfyExpected<Actual>>>(actual: Actual, expected: Expected) {
Expand Down

0 comments on commit 786c850

Please sign in to comment.