From a524192bf5fe8472feea0dbee5c5100ce94512df Mon Sep 17 00:00:00 2001 From: Cameron Little Date: Wed, 24 May 2017 09:34:25 -0700 Subject: [PATCH] Add `Component

` class This allows declaring a parameter or variable as a general "component with props P" instead of needing to declare it class based or function. --- types/react/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index e9aa299934..26a77b8055 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -26,6 +26,7 @@ declare namespace React { // ---------------------------------------------------------------------- type ReactType = string | ComponentClass | StatelessComponent; + type Component

= ComponentClass

| StatelessComponent

; type Key = string | number; type Ref = string | ((instance: T) => any);