mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Update docs/index-type-operator.md
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
This commit is contained in:
parent
f71f1d95cf
commit
f2c9c59045
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ If the indexer is not a type,
|
|||
local key = "age"
|
||||
type age = index<Person, key> -- Error message: Second argument to index<Person,_> is not a valid index type; Unknown type 'key'
|
||||
```
|
||||
Note: these errors will be part of the general type family reduction errors since `index` will be built into the type family system.
|
||||
Note: these errors will be part of the general type function reduction errors since `index` will be built into the type function system.
|
||||
|
||||
The indexee may be a union type. In this case, the type function will distribute the arguments to multiple type families:
|
||||
```luau
|
||||
|
|
Loading…
Add table
Reference in a new issue