/// import Roact from "./index"; type MapBindings = { [K in keyof T]: T[K] | Roact.Binding }; /** * Creates a new Roact element representing the given `component`. Elements are lightweight descriptions about what a * Roblox Instance should look like, like a blueprint! * * The `children` argument is shorthand for adding a `Roact.Children` key to `props`. It should be specified as a * dictionary of names to elements. * * `component` can be a string, a function, or a table created by `Component:extend`. * * **Caution:** Make sure not to modify `props` or `children` after they're passed into `createElement`! */ // Functional Component declare function createElement

( component: Roact.FunctionComponent

, props?: MapBindings

, children?: | { [childName: string]: Roact.Element } | ReadonlyMap | ReadonlyArray, ): Roact.Element; // Class Component declare function createElement

( component: Roact.ComponentConstructor

, props?: MapBindings

, children?: | { [childName: string]: Roact.Element } | ReadonlyMap | ReadonlyArray, ): Roact.Element; type HostComponentProps = Partial> & { [Roact.Ref]?: Roact.Ref | ((ref: CreatableInstances[T]) => void); }; // Host Component declare function createElement( component: C, props?: MapBindings>, children?: | { [childName: string]: Roact.Element } | ReadonlyMap | ReadonlyArray, ): Roact.Element; export = createElement;