DefinitelyTyped/types/react-hyperscript/index.d.ts

25 lines
784 B
TypeScript
Raw Permalink Normal View History

// 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.8
import { ComponentClass, StatelessComponent, ReactElement } from 'react';
declare namespace h {}
2019-02-12 13:01:30 +00:00
type Element = ReactElement | string | number | null;
2017-12-19 14:02:35 +00:00
2017-12-19 14:54:20 +00:00
declare function h(
componentOrTag: ComponentClass | StatelessComponent | string,
children?: ReadonlyArray<Element> | Element
2019-02-12 13:01:30 +00:00
): ReactElement;
2017-12-19 14:54:20 +00:00
declare function h<P extends {[attr: string]: any}>(
componentOrTag: ComponentClass<P> | StatelessComponent<P> | string,
2017-12-19 14:54:20 +00:00
properties: P,
2017-12-19 14:02:35 +00:00
children?: ReadonlyArray<Element> | Element
): ReactElement<P>;
export = h;