mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add new package: react-hyperscript * Type of function should be declared by function keyword... * Add a workaround tsc does not allow `export =`ing function because ES spec does not allow that. But react-hyperscript does that. So this workaround is required.
18 lines
557 B
TypeScript
18 lines
557 B
TypeScript
// Type definitions for react-hyperscript 3.0
|
|
// Project: https://github.com/mlmorg/react-hyperscript
|
|
// Definitions by: tock203 <https://github.com/tock203>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
import { ComponentClass, StatelessComponent, ReactElement } from 'react';
|
|
|
|
declare namespace h {}
|
|
|
|
declare function h<P>(
|
|
componentOrTag: ComponentClass<P> | StatelessComponent<P> | string,
|
|
properties?: P,
|
|
children?: ReadonlyArray<ReactElement<any>> | string
|
|
): ReactElement<P>;
|
|
|
|
export = h;
|