Skip to content

Commit

Permalink
docs: Make "New type with no constraint" section clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
Iltotore committed Jul 7, 2023
1 parent 544d0e4 commit 1d33377
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/_docs/reference/newtypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ constraint. [[Pure|io.github.iltotore.iron.constraint.any.Pure]] is an alias for
[[True|io.github.iltotore.iron.constraint.any.True]], a constraint that is always satisfied.

```scala
type FirstName = String :| Pure
opaque type FirstName = String :| Pure
object FirstName extends RefinedTypeOps[FirstName]
```
```scala
val firstName = FirstName("whatever")
```

## Inheriting base type
Expand Down

0 comments on commit 1d33377

Please sign in to comment.