Skip to content

Commit b593d7c

Browse files
authored
fix contract function return type
1 parent aea00f1 commit b593d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ const predicate = (a) => a > 2
343343
A contract specifies the obligations and guarantees of the behavior from a function or expression at runtime. This acts as a set of rules that are expected from the input and output of a function or expression, and errors are generally reported whenever a contract is violated.
344344

345345
```js
346-
// Define our contract : int -> int
346+
// Define our contract : int -> boolean
347347
const contract = (input) => {
348348
if (typeof input === 'number') return true
349349
throw new Error('Contract violated: expected int -> int')

0 commit comments

Comments
 (0)