Skip to content

Extern returning in create.GetInstance - #64

Open
EstebenR wants to merge 1 commit into
ffrostfall:mainfrom
EstebenR:main
Open

Extern returning in create.GetInstance#64
EstebenR wants to merge 1 commit into
ffrostfall:mainfrom
EstebenR:main

Conversation

@EstebenR

@EstebenR EstebenR commented Aug 3, 2026

Copy link
Copy Markdown

GetInstance was returning type Instance for any singleton roblox type passed to Fluid.PropertiesFor<> because they count as extern.

This change allows for creating components extending roblox types comfortably like so

return function(props: Fluid.PropertiesFor<TextLabel> & { HoverColor: Color3 })
	return Fluid.create("TextLabel")({
		Text = "Test",
		BackgroundTransparency = props.BackgroundTransparency or 1,

		Fluid.create("ImageLabel")({}),
	})
end

Previously this would have thrown a type error, as BackgroundTransparency was not present in type Instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant