Skip to content

Commit fdc5fd2

Browse files
committed
refactor: update deps and fix deprecations
1 parent 3d4f87f commit fdc5fd2

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"@cycle/run": "^5.3.0",
2929
"@types/mocha": "^5.2.7",
3030
"@types/node": "^10.5.2",
31-
"@types/react": "16.9.3",
31+
"@types/react": "16.9.49",
3232
"mocha": "^6.2.0",
33-
"react": "16.9.0",
34-
"react-dom": "16.9.0",
35-
"react-test-renderer": "16.9.0",
33+
"react": "16.13.1",
34+
"react-dom": "16.13.1",
35+
"react-test-renderer": "16.13.1",
3636
"symbol-observable": "^1.2.0",
3737
"ts-node": "^7.0.0",
3838
"typescript": "3.6.3",

Diff for: src/h.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@ import {
22
createElement,
33
ReactElement,
44
ReactNode,
5-
ReactType,
5+
ElementType,
66
ReactHTML,
77
Attributes,
88
} from 'react';
99
import {incorporate} from './incorporate';
1010

1111
export type PropsExtensions = {
1212
sel?: string | symbol;
13+
domProps?: any
1314
};
1415

1516
type PropsLike<P> = P & PropsExtensions & Attributes;
1617

1718
type Children = string | Array<ReactNode>;
1819

1920
function createElementSpreading<P = any>(
20-
type: ReactType<P> | keyof ReactHTML,
21+
type: ElementType<P> | keyof ReactHTML,
2122
props: PropsLike<P> | null,
2223
children: Children,
2324
): ReactElement<P> {
@@ -29,7 +30,7 @@ function createElementSpreading<P = any>(
2930
}
3031

3132
function hyperscriptProps<P = any>(
32-
type: ReactType<P> | keyof ReactHTML,
33+
type: ElementType<P> | keyof ReactHTML,
3334
props: PropsLike<P>,
3435
): ReactElement<P> {
3536
if (!props.sel) {
@@ -40,14 +41,14 @@ function hyperscriptProps<P = any>(
4041
}
4142

4243
function hyperscriptChildren<P = any>(
43-
type: ReactType<P> | keyof ReactHTML,
44+
type: ElementType<P> | keyof ReactHTML,
4445
children: Children,
4546
): ReactElement<P> {
4647
return createElementSpreading(type, null, children);
4748
}
4849

4950
function hyperscriptPropsChildren<P = any>(
50-
type: ReactType<P> | keyof ReactHTML,
51+
type: ElementType<P> | keyof ReactHTML,
5152
props: PropsLike<P>,
5253
children: Children,
5354
): ReactElement<P> {
@@ -59,7 +60,7 @@ function hyperscriptPropsChildren<P = any>(
5960
}
6061

6162
export function h<P = any>(
62-
type: ReactType<P> | keyof ReactHTML,
63+
type: ElementType<P> | keyof ReactHTML,
6364
a?: PropsLike<P> | Children,
6465
b?: Children,
6566
): ReactElement<P> {

0 commit comments

Comments
 (0)