diff --git a/package.json b/package.json index c0dec0c..3b6d78c 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,11 @@ "@cycle/run": "^5.3.0", "@types/mocha": "^5.2.7", "@types/node": "^10.5.2", - "@types/react": "16.9.3", + "@types/react": "16.9.49", "mocha": "^6.2.0", - "react": "16.9.0", - "react-dom": "16.9.0", - "react-test-renderer": "16.9.0", + "react": "16.13.1", + "react-dom": "16.13.1", + "react-test-renderer": "16.13.1", "symbol-observable": "^1.2.0", "ts-node": "^7.0.0", "typescript": "3.6.3", diff --git a/src/h.ts b/src/h.ts index 126be65..7aa0da5 100644 --- a/src/h.ts +++ b/src/h.ts @@ -2,7 +2,7 @@ import { createElement, ReactElement, ReactNode, - ReactType, + ElementType, ReactHTML, Attributes, } from 'react'; @@ -17,7 +17,7 @@ type PropsLike
= P & PropsExtensions & Attributes;
type Children = string | Array (
- type: ReactType | keyof ReactHTML,
+ type: ElementType | keyof ReactHTML,
props: PropsLike | null,
children: Children,
): ReactElement {
@@ -29,7 +29,7 @@ function createElementSpreading (
}
function hyperscriptProps (
- type: ReactType | keyof ReactHTML,
+ type: ElementType | keyof ReactHTML,
props: PropsLike ,
): ReactElement {
if (!props.sel) {
@@ -40,14 +40,14 @@ function hyperscriptProps (
}
function hyperscriptChildren (
- type: ReactType | keyof ReactHTML,
+ type: ElementType | keyof ReactHTML,
children: Children,
): ReactElement {
return createElementSpreading(type, null, children);
}
function hyperscriptPropsChildren (
- type: ReactType | keyof ReactHTML,
+ type: ElementType | keyof ReactHTML,
props: PropsLike ,
children: Children,
): ReactElement {
@@ -59,7 +59,7 @@ function hyperscriptPropsChildren (
}
export function h (
- type: ReactType | keyof ReactHTML,
+ type: ElementType | keyof ReactHTML,
a?: PropsLike | Children,
b?: Children,
): ReactElement {