mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-10 13:30:55 +01:00
Not tuples!
This commit is contained in:
parent
7edc03bb52
commit
35b94b2715
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ In alignment with [named function type arguments](./syntax-named-function-type-a
|
|||
|
||||
## Motivation
|
||||
|
||||
Luau does not include semantic information when describing a function returning a tuple of values. This is especially a problem when they can't be distinguished by type alone:
|
||||
Luau does not include semantic information when describing a function returning multiple values. This is especially a problem when they can't be distinguished by type alone:
|
||||
|
||||
```Lua
|
||||
-- are the euler angles returned in order of application, or alphabetical (XYZ) order?
|
||||
|
@ -56,7 +56,7 @@ toQuat: () -> (x: number, y: number, z: number, w: number)
|
|||
|
||||
## Design
|
||||
|
||||
This proposal mirrors the existing named function type argument syntax and allows it to be used in return position. This allows returned tuples to be annotated with their contents.
|
||||
This proposal mirrors the existing named function type argument syntax and allows it to be used in return position. This allows returned values to be annotated with their contents.
|
||||
|
||||
This is added to all locations where return types can be defined:
|
||||
```Lua
|
||||
|
|
Loading…
Add table
Reference in a new issue