From 90e1bc1afa41a87dae3fe6b785f8cd0ec1a4617c Mon Sep 17 00:00:00 2001 From: tock203 Date: Tue, 19 Dec 2017 23:51:38 +0900 Subject: [PATCH] Add testcase --- types/react-hyperscript/react-hyperscript-tests.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/react-hyperscript/react-hyperscript-tests.ts b/types/react-hyperscript/react-hyperscript-tests.ts index d8737e6ca9..1d037d6bc2 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 { render() { return React.createElement('div'); } } -const StatelessComponent = () => React.createElement('div'); +const StatelessComponent: React.StatelessComponent = () => React.createElement('div'); class MainComponent extends React.Component { render() { @@ -25,7 +29,8 @@ class MainComponent extends React.Component { h('a', {href: 'http://whatever.com'}, 'One list item') ]), h('li', 'Another list item') - ]) + ]), + h('img', {src: 'https://example.com/some-image'}) ]); } }