From 470c9170ff08c0bc4676b3296363e6da27ed80ac Mon Sep 17 00:00:00 2001 From: randomizednum Date: Sun, 7 Aug 2022 14:10:41 +0300 Subject: [PATCH] Update trackable-types.md --- rfcs/trackable-types.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rfcs/trackable-types.md b/rfcs/trackable-types.md index 4fdcaffd..01eb8254 100644 --- a/rfcs/trackable-types.md +++ b/rfcs/trackable-types.md @@ -30,9 +30,11 @@ type Font = "Font1" | "Font2" | "Font3" type Object = {X: number, Y: number, text: string | , font: Font | nil_status} ``` +Between the angle brackets, a name followed by an equals sign and then a type is expected. Alternatively, a name followed by nothing can be used to track something with a name already associated with a type. + The scope of these types should be the function in which they are used in. If they aren't defined in a function, then it is the global scope. -In this code, the type of `font` will never change the type of `text`, but the opposite is true. If `font` is guaranteed to be non-nil, text isn't. To make it replicate to text as well, `font` should have the type `` without initialization. +The type of `font` will never change the type of `text`, but the opposite is true. If `font` is guaranteed to be non-nil, text isn't. To make it replicate to text as well, `font` should have the type `` without initialization. ```lua type Font = "Font1" | "Font2" | "Font3"