From d78e3948356585d8ca324cfb4e0791344fde2a0f Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Sun, 13 Jan 2019 05:37:57 -0800 Subject: [PATCH] small change --- packages/alert-dialog/index.d.ts | 4 ++-- packages/component-component/index.d.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/alert-dialog/index.d.ts b/packages/alert-dialog/index.d.ts index e2beaeb14..e507217f7 100644 --- a/packages/alert-dialog/index.d.ts +++ b/packages/alert-dialog/index.d.ts @@ -1,6 +1,6 @@ -import { DialogProps, DialogContentProps } from "@reach/dialog"; - declare module "@reach/alert-dialog" { + import { DialogProps, DialogContentProps } from "@reach/dialog"; + type AlertDialogProps = { isOpen: boolean; onDismiss: () => void; diff --git a/packages/component-component/index.d.ts b/packages/component-component/index.d.ts index 33c3f6c48..8ffa347f6 100644 --- a/packages/component-component/index.d.ts +++ b/packages/component-component/index.d.ts @@ -13,7 +13,7 @@ declare module "@reach/component-component" { type Refs = { [key: string]: React.RefObject }; - type StateProps = Pick, "state" | "props">; + type StateProps = Pick, "state" | "props">; export type ComponentProps = { initialState?: S; @@ -33,7 +33,10 @@ declare module "@reach/component-component" { render?(args: Args): void; }; - class Component extends React.Component, {}> {} + class Component< + P extends ComponentProps, + S = any + > extends React.Component, {}> {} export default Component; }