From 10a78d43235e7ccc358ea36c43c9f36d90c75c15 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Wed, 22 Oct 2014 17:11:22 -0700 Subject: [PATCH] Adding createElement This is based off the work of @jnetterf in https://github.com/Asana/typed-react/pull/24/files#diff-4 --- react/react.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/react/react.d.ts b/react/react.d.ts index 2d6696066..40522920f 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -12,6 +12,12 @@ declare module React { export function createFactory

(clazz: ReactComponentFactory

): ReactComponentFactory

; + export function createElement

(clazz: ReactComponentFactory

, props: P, ...children: any[]): ReactComponentElement

; + + export function createElement(type: string, props: DomAttributes, ...children: any[]): ReactHTMLElement; + + export function createElement(type: string, props: SvgAttributes, ...children: any[]): ReactSVGElement; + export function render

(component: ReactComponentElement

, container: Element, callback?: () => void): ReactComponentElement

; export function render(component: ReactHTMLElement, container: Element, callback?: () => void): ReactHTMLElement;