Skip to content

Commit 3b66b1f

Browse files
authored
Merge branch 'master' into domProps
2 parents 22b03eb + 5c71a2b commit 3b66b1f

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

.github/workflows/main.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install
16+
run: npm install
17+
- name: Compile
18+
run: npm run compile
19+
- name: Test
20+
run: npm test

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cycle/react",
3-
"version": "2.7.0",
3+
"version": "2.8.0",
44
"description": "Utilities to interoperate between Cycle.js and React",
55
"author": "Andre Staltz <[email protected]>",
66
"license": "MIT",

src/h.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
createElement,
33
ReactElement,
44
ReactNode,
5-
ReactType,
5+
ElementType,
66
ReactHTML,
77
Attributes,
88
} from 'react';
@@ -18,7 +18,7 @@ type PropsLike<P> = P & PropsExtensions & Attributes;
1818
type Children = string | Array<ReactNode>;
1919

2020
function createElementSpreading<P = any>(
21-
type: ReactType<P> | keyof ReactHTML,
21+
type: ElementType<P> | keyof ReactHTML,
2222
props: PropsLike<P> | null,
2323
children: Children,
2424
): ReactElement<P> {
@@ -30,7 +30,7 @@ function createElementSpreading<P = any>(
3030
}
3131

3232
function hyperscriptProps<P = any>(
33-
type: ReactType<P> | keyof ReactHTML,
33+
type: ElementType<P> | keyof ReactHTML,
3434
props: PropsLike<P>,
3535
): ReactElement<P> {
3636
if (!props.sel && !hasModuleProps(props)) {
@@ -41,14 +41,14 @@ function hyperscriptProps<P = any>(
4141
}
4242

4343
function hyperscriptChildren<P = any>(
44-
type: ReactType<P> | keyof ReactHTML,
44+
type: ElementType<P> | keyof ReactHTML,
4545
children: Children,
4646
): ReactElement<P> {
4747
return createElementSpreading(type, null, children);
4848
}
4949

5050
function hyperscriptPropsChildren<P = any>(
51-
type: ReactType<P> | keyof ReactHTML,
51+
type: ElementType<P> | keyof ReactHTML,
5252
props: PropsLike<P>,
5353
children: Children,
5454
): ReactElement<P> {
@@ -60,7 +60,7 @@ function hyperscriptPropsChildren<P = any>(
6060
}
6161

6262
export function h<P = any>(
63-
type: ReactType<P> | keyof ReactHTML,
63+
type: ElementType<P> | keyof ReactHTML,
6464
a?: PropsLike<P> | Children,
6565
b?: Children,
6666
): ReactElement<P> {

0 commit comments

Comments
 (0)