fix: change variable asserted in documentation (#60)

This commit is contained in:
Matthew Pagan 2021-08-04 12:25:01 -04:00 committed by GitHub
parent e9db7cd1dc
commit 9cc9934370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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