mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 05:20:38 +00:00
Update typecheck.md
This commit is contained in:
parent
9d4f338473
commit
43fed897c1
1 changed files with 3 additions and 1 deletions
|
@ -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`.
|
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
|
```lua
|
||||||
local part = Instance.new("Part")
|
local part = Instance.new("Part")
|
||||||
|
|
Loading…
Reference in a new issue