// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -29,7 +29,7 @@ declare namespace React {
type ComponentType = ComponentClass
| StatelessComponent
;
type Key = string | number;
- type Ref = string | ((instance: T) => any);
+ type Ref = string | ((instance: T | null) => any);
type ComponentState = {} | void;
interface Attributes {
@@ -447,7 +447,7 @@ declare namespace React {
* `createElement` or a factory, use `ClassAttributes`:
*
* ```ts
- * var b: Button;
+ * var b: Button | null;
* var props: ButtonProps & ClassAttributes