mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-18 10:53:46 +01:00
Motivation grammar fix
This commit is contained in:
parent
6241ae4afc
commit
960e34e233
1 changed files with 2 additions and 4 deletions
|
@ -6,9 +6,7 @@ This RFC proposes allowing strings as keys for methods on the `table` type userd
|
|||
|
||||
## Motivation
|
||||
|
||||
Currently having to always wrap string literal keys in `types.singleton` is annoying, and becomes especially annoying when using `types.newtable` due to having to write `[types.singleton("key")]` for every single key in the props table.
|
||||
|
||||
This leads to developers having to write the following:
|
||||
Currently having to always wrap string literal keys in `types.singleton` is annoying, and becomes especially annoying when using `types.newtable` due to having to write something like the following:
|
||||
|
||||
```luau
|
||||
types.newtable({
|
||||
|
@ -17,7 +15,7 @@ types.newtable({
|
|||
})
|
||||
```
|
||||
|
||||
When the following could be written instead, if it were allowed:
|
||||
Instead of:
|
||||
|
||||
```luau
|
||||
types.newtable({
|
||||
|
|
Loading…
Add table
Reference in a new issue