Update docs/_pages/typecheck.md

This commit is contained in:
Arseny Kapoulkine 2022-03-31 10:51:18 -07:00 committed by GitHub
parent 3533171fab
commit c561ae51b1
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,7 +380,7 @@ local account: Account = Account.new("Alexander", 500)
## Tagged unions ## Tagged unions
Tagged unions are just unions types! In particular, they're union types of tables where they have at least _some_ common properties but the structure of the tables are different enough. Here's one example: Tagged unions are just union types! In particular, they're union types of tables where they have at least _some_ common properties but the structure of the tables are different enough. Here's one example:
```lua ```lua
type Result<T, E> = { type: "ok", value: T } | { type: "err", error: E } type Result<T, E> = { type: "ok", value: T } | { type: "err", error: E }