mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Apply suggestions from code review
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
This commit is contained in:
parent
8706ff0c92
commit
8cebfb344c
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ local b: unknown = 5
|
|||
local c: unknown = function() return 5 end
|
||||
```
|
||||
|
||||
Unlike `any`, `unknown` will not allow itself to inhabit into a different type!
|
||||
Unlike `any`, `unknown` will not allow itself to be used as a different type!
|
||||
|
||||
```lua
|
||||
local function unknown(): unknown
|
||||
|
@ -113,7 +113,7 @@ end
|
|||
|
||||
## `any` type
|
||||
|
||||
`any` is just like `unknown`, except that it allows itself to inhabit into a different type. Essentially, it's an opt-out from the type system entirely.
|
||||
`any` is just like `unknown`, except that it allows itself to be used as an arbitrary type without further checks or annotations. Essentially, it's an opt-out from the type system entirely.
|
||||
|
||||
```lua
|
||||
local x: any = 5
|
||||
|
|
Loading…
Add table
Reference in a new issue