mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
fix: change variable asserted in documentation (#60)
This commit is contained in:
parent
e9db7cd1dc
commit
9cc9934370
@ -347,7 +347,7 @@ And using `assert` will work with the above type guards:
|
||||
```lua
|
||||
local stringOrNumber: string | number = "foo"
|
||||
|
||||
assert(type(x) == "string")
|
||||
assert(type(stringOrNumber) == "string")
|
||||
|
||||
local onlyString: string = stringOrNumber -- ok
|
||||
local onlyNumber: number = stringOrNumber -- not ok
|
||||
|
Loading…
Reference in New Issue
Block a user