diff --git a/types/react-hyperscript/index.d.ts b/types/react-hyperscript/index.d.ts index 4ead727398..207ffe18ce 100644 --- a/types/react-hyperscript/index.d.ts +++ b/types/react-hyperscript/index.d.ts @@ -8,10 +8,17 @@ import { ComponentClass, StatelessComponent, ReactElement } from 'react'; declare namespace h {} -declare function h
(
+type Element = ReactElement (
componentOrTag: ComponentClass | StatelessComponent | string,
- properties?: P,
- children?: ReadonlyArray ;
export = h;
diff --git a/types/react-hyperscript/react-hyperscript-tests.ts b/types/react-hyperscript/react-hyperscript-tests.ts
index 9782a79248..4be72a9b6a 100644
--- a/types/react-hyperscript/react-hyperscript-tests.ts
+++ b/types/react-hyperscript/react-hyperscript-tests.ts
@@ -1,13 +1,17 @@
import * as React from 'react';
import * as h from 'react-hyperscript';
-class SomeComponent extends React.Component {
+interface PropTypes {
+ foo: string;
+}
+
+class SomeComponent extends React.Component