Reflection Based Type Functions

Currently there is no good way for UI Frameworks like React, Fusion, Vide or Fluid to provide proper types with their constructors for instances, while yes they can do this, its clearly not great for obvious reasons.

So it’d be great to have a type function implemented by Roblox that can give a Instance from a string.
type Part = InstanceFromString<"Part">
As using typeof doesn’t work:

type InstanceFromString<S> = typeof(Instance.new(({} :: any) :: S))
-- this just gives 'any' as a type
type Part = InstanceFromString<"Part">
8 Likes