Replace old read-only syntax on property-writeonly.md

This commit is contained in:
alicesaidhi 2025-01-29 16:22:47 +01:00 committed by GitHub
parent bb8d984bca
commit 30462dc7e7
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -87,7 +87,7 @@ end
``` ```
has inferred type: has inferred type:
``` ```
f: (t: { write p: number, get q: number }) -> () f: (t: { write p: number, read q: number }) -> ()
``` ```
indicating that `p` is used write-only but `q` is used read-only. indicating that `p` is used write-only but `q` is used read-only.
@ -160,7 +160,7 @@ Once we have read-only properties and write-only properties, type intersection
gives read-write properties with different types. gives read-write properties with different types.
```luau ```luau
{ get p: T } & { write p : U } { read p: T } & { write p : U }
``` ```
If we infer such types, we may wish to present them differently, for If we infer such types, we may wish to present them differently, for