Update docs/index-type-operator.md

Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
This commit is contained in:
Junseo Yoo 2024-06-20 11:20:08 -07:00 committed by GitHub
parent f71f1d95cf
commit f2c9c59045
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -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