Expanded all 315 instances type into a separate module#74
Expanded all 315 instances type into a separate module#74AeroUtilities wants to merge 2 commits into
Conversation
Created all of the current component types that are built in Roblox Studio.
Removed the instance type in create and separated the instance module into the types folder.
|
a lot of these are unnecessary. this is a UI library |
Understandable. I did mention that not all instance may be used, but I wanted to keep the scope wide so nothing is left out. I also noticed there's a There are some missing UI instances in the list like Commit 19eaeb4:
type Instances = {
Folder: Folder,
BillboardGui: BillboardGui,
CanvasGroup: CanvasGroup,
Frame: Frame,
ImageButton: ImageButton,
ImageLabel: ImageLabel,
ScreenGui: ScreenGui,
ScrollingFrame: ScrollingFrame,
SurfaceGui: SurfaceGui,
TextBox: TextBox,
TextButton: TextButton,
TextLabel: TextLabel,
UIAspectRatioConstraint: UIAspectRatioConstraint,
UICorner: UICorner,
UIGradient: UIGradient,
UIGridLayout: UIGridLayout,
UIListLayout: UIListLayout,
Camera: Camera,
WorldModel: WorldModel,
}
return {
Part = {
Material = Enum.Material.SmoothPlastic,
Size = vector.create(1, 1, 1),
Anchored = true
},
} |
|
No idea how luau actually decides this, but on my end it just gave up typechecking because "type too complex" when I had too many entries in the Instances type. |
The
Instancestype increate.luauonly had 19 instance types written.I decided to create a types folder and the
types/instances.luaumodule covering all the built in instances in Roblox Studio that were sourced from the Roblox API dump. That way the autocompletion for any of the missing instances works in IDE's.All of the instances may not be used with vide but you can definitely make cool projects even with creating plugins with the instances!
Changes:
src/types/instances.luausrc/types/instances.luauintosrc/create.luautype Instancesto use theinstances.luaumoduleHope this is helpful!