Update typecheck.md

This commit is contained in:
Arseny Kapoulkine 2020-11-02 12:06:08 -08:00 committed by GitHub
parent 9d4f338473
commit 43fed897c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -313,7 +313,9 @@ Roblox supports a rich set of classes and data types, [documented here](https://
When one type inherits from another type, the type checker models this relationship and allows to cast a subclass to the parent class implicitly, so you can pass a `Part` to a function that expects an `Instance`.
Additionally, we can automatically deduce what calls like `Instance.new` and `game:GetService` are supposed to return:
All enums are also available to use by their name as part of the `Enum` type library, e.g. `local m: Enum.Material = part.Material`.
Finally, we can automatically deduce what calls like `Instance.new` and `game:GetService` are supposed to return:
```lua
local part = Instance.new("Part")