DefinitelyTyped/types/create-react-class/index.d.ts
Josh Goldberg e7f4d0d913 Made create-react-class S(tate) template optional (#39154)
* create-react-class: default state to {}

It's irksome having to always provide a `{}`...

* Added props-without-state test

* Added props declaration to CCC
2019-10-17 14:22:52 -07:00

14 lines
511 B
TypeScript

// Type definitions for create-react-class 15.6
// Project: https://facebook.github.io/react/
// Definitions by: John Gozde <https://github.com/jgoz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { ComponentSpec, ClassicComponentClass } from "react";
declare namespace createReactClass {}
declare function createReactClass<P, S = {}>(spec: ComponentSpec<P, S>): ClassicComponentClass<P>;
export as namespace createReactClass;
export = createReactClass;