Skip to content

Commit

Permalink
Merge branch 'master' into domProps
Browse files Browse the repository at this point in the history
  • Loading branch information
ntilwalli committed Sep 23, 2020
2 parents 51678d7 + 5c71a2b commit 54cb1f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install
run: npm install
- name: Compile
run: npm run compile
- name: Test
run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cycle/react",
"version": "2.7.0",
"version": "2.8.0",
"description": "Utilities to interoperate between Cycle.js and React",
"author": "Andre Staltz <contact@staltz.com>",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions src/h.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createElement,
ReactElement,
ReactNode,
ReactType,
ElementType,
ReactHTML,
Attributes,
} from 'react';
Expand All @@ -29,7 +29,7 @@ type PropsLike<P> = P & PropsExtensions & Attributes;
type Children = string | Array<ReactNode>;

function createElementSpreading<P = any>(
type: ReactType<P> | keyof ReactHTML,
type: ElementType<P> | keyof ReactHTML,
props: PropsLike<P> | null,
children: Children,
): ReactElement<P> {
Expand All @@ -41,7 +41,7 @@ function createElementSpreading<P = any>(
}

function hyperscriptProps<P = any>(
type: ReactType<P> | keyof ReactHTML,
type: ElementType<P> | keyof ReactHTML,
props: PropsLike<P>,
): ReactElement<P> {
if (!shouldIncorporate(props)) {
Expand All @@ -52,14 +52,14 @@ function hyperscriptProps<P = any>(
}

function hyperscriptChildren<P = any>(
type: ReactType<P> | keyof ReactHTML,
type: ElementType<P> | keyof ReactHTML,
children: Children,
): ReactElement<P> {
return createElementSpreading(type, null, children);
}

function hyperscriptPropsChildren<P = any>(
type: ReactType<P> | keyof ReactHTML,
type: ElementType<P> | keyof ReactHTML,
props: PropsLike<P>,
children: Children,
): ReactElement<P> {
Expand All @@ -71,7 +71,7 @@ function hyperscriptPropsChildren<P = any>(
}

export function h<P = any>(
type: ReactType<P> | keyof ReactHTML,
type: ElementType<P> | keyof ReactHTML,
a?: PropsLike<P> | Children,
b?: Children,
): ReactElement<P> {
Expand Down

0 comments on commit 54cb1f8

Please sign in to comment.