mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update docs/_pages/typecheck.md
This commit is contained in:
parent
3533171fab
commit
c561ae51b1
1 changed files with 1 additions and 1 deletions
|
@ -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 }
|
||||||
|
|
Loading…
Add table
Reference in a new issue