diff --git a/types/jsnox/index.d.ts b/types/jsnox/index.d.ts index e8c3e65b51..791141da16 100644 --- a/types/jsnox/index.d.ts +++ b/types/jsnox/index.d.ts @@ -1,11 +1,9 @@ -// Type definitions for JSnoX +// Type definitions for JSnoX 2.1 // Project: https://github.com/af/jsnox // Definitions by: Steve Baker // Dovydas Navickas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 - -/// +// TypeScript Version: 2.3 import * as React from "react"; @@ -14,13 +12,10 @@ import * as React from "react"; * This will normally be the React object but could be something else */ interface ReactLikeObject { - createElement

(type: React.ComponentClass

| string, - props: P, children: React.ReactNode): React.ReactElement

; + createElement

(type: React.ComponentClass

| string, props: P, children: React.ReactNode): React.ReactElement

; } -interface Module { - (reactObj: ReactLikeObject): CreateElement -} +type Module = (reactObj: ReactLikeObject) => CreateElement; interface CreateElement { /** @@ -31,7 +26,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -

(specString: string, children: React.ReactNode): React.DOMElement +

(specString: string, children: React.ReactNode): React.DOMElement; /** * Renders an HTML element from the given spec string, with optional props @@ -42,8 +37,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -

(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement - +

(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement; /** * Renders a React component, with children but no props @@ -52,7 +46,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -

(component: React.ComponentClass

, children: React.ReactNode): React.ReactElement

+

(component: React.ComponentClass

, children: React.ReactNode): React.ReactElement

; /** * Renders a React component, with optional props and children @@ -62,8 +56,8 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -

(component: React.ComponentClass

, props?: P, children?: React.ReactNode): React.ReactElement

+

(component: React.ComponentClass

, props?: P, children?: React.ReactNode): React.ReactElement

; } -declare var exports: Module -export = exports +declare var exports: Module; +export = exports; diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 46b34637bc..29190c3c9d 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -12,7 +12,7 @@ // Tanguy Krotoff // Dovydas Navickas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.3 type NativeAnimationEvent = AnimationEvent; type NativeClipboardEvent = ClipboardEvent;