1
0
Fork 0
mirror of https://github.com/luau-lang/luau.git synced 2025-04-07 04:10:54 +01:00

fix: change variable asserted in documentation ()

This commit is contained in:
Matthew Pagan 2021-08-04 12:25:01 -04:00 committed by GitHub
parent e9db7cd1dc
commit 9cc9934370
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,7 +347,7 @@ And using `assert` will work with the above type guards:
```lua ```lua
local stringOrNumber: string | number = "foo" local stringOrNumber: string | number = "foo"
assert(type(x) == "string") assert(type(stringOrNumber) == "string")
local onlyString: string = stringOrNumber -- ok local onlyString: string = stringOrNumber -- ok
local onlyNumber: number = stringOrNumber -- not ok local onlyNumber: number = stringOrNumber -- not ok