Skip to content

Commit

Permalink
Fix critical typo in coercions.md (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
houd1ni authored Sep 27, 2024
1 parent 0fe23dd commit e414c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/coercions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ const b = create('42', MyNumber) // 42
const c = create(false, MyNumber) // error thrown!
```

The second argument to `coerce` is a struct narrowing the types of input values you want to try coercion. In the example above, the coercion functionn will only ever be called when the input is a string—booleans would ignore coercion and fail normally.
The second argument to `coerce` is a struct narrowing the types of input values you want to try coercion. In the example above, the coercion function will only ever be called when the input is a string—booleans would ignore coercion and fail normally.

> 🤖 If you want to run coercion for any type of input, use the `unknown()` struct to run it in all cases.

0 comments on commit e414c8a

Please sign in to comment.