Fix invalid escape sequence

It seems like this was intended to match a digit
This commit is contained in:
Halalaluyafail3 2022-01-14 16:02:53 -05:00 committed by GitHub
parent dfe6230c5f
commit f18de4ba7d
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ In addition to declaring types for a given value, Luau supports declaring type a
```lua ```lua
type Point = { x: number, y: number } type Point = { x: number, y: number }
type Array<T> = { [number]: T } type Array<T> = { [number]: T }
type Something = typeof(string.gmatch("", "\d")) type Something = typeof(string.gmatch("", "%d"))
``` ```
The right hand side of the type alias can be a type definition or a `typeof` expression; `typeof` expression doesn't evaluate its argument at runtime. The right hand side of the type alias can be a type definition or a `typeof` expression; `typeof` expression doesn't evaluate its argument at runtime.