mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Fix type
This commit is contained in:
parent
22183184b0
commit
fd974c467d
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ local b: number = t.b
|
||||||
Without explicit types, local assignments and for loops will assume the type of `<rhs>.<field>`. For example...
|
Without explicit types, local assignments and for loops will assume the type of `<rhs>.<field>`. For example...
|
||||||
```lua
|
```lua
|
||||||
-- x and y will both be typed `number` here
|
-- x and y will both be typed `number` here
|
||||||
local { .x, .y } = position :: { number }
|
local { .x, .y } = position :: { x: number, y: number }
|
||||||
```
|
```
|
||||||
|
|
||||||
Additionally, you can specify a type on the "table" as a whole.
|
Additionally, you can specify a type on the "table" as a whole.
|
||||||
|
|
Loading…
Add table
Reference in a new issue