From 664ccf2301ddc6e5805653e1c364f2b119cfb893 Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Wed, 23 May 2018 20:57:57 -0700 Subject: [PATCH] [create-subscription] Remove unused state interface --- types/create-subscription/index.d.ts | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/types/create-subscription/index.d.ts b/types/create-subscription/index.d.ts index 28cfbd4e31..3a4c090c1e 100644 --- a/types/create-subscription/index.d.ts +++ b/types/create-subscription/index.d.ts @@ -7,17 +7,6 @@ import * as React from "react"; -export interface SubscriptionProps { - children: (value: T) => React.ReactNode; - source: S; -} - -export interface SubscriptionState { - source: S; - value: T; -} - -export interface Subscription extends React.ComponentClass> {} export type Unsubscribe = () => any; export interface SubscriptionConfig { @@ -35,10 +24,14 @@ export interface SubscriptionConfig { * Those handlers should not attempt to update state though; * They should call the callback() instead when a subscription changes. */ - subscribe: ( - source: S, - callback: (newValue: T) => void - ) => Unsubscribe; + subscribe: (source: S, callback: (newValue: T) => void) => Unsubscribe; } +export interface SubscriptionProps { + children: (value: T) => React.ReactNode; + source: S; +} + +export interface Subscription extends React.ComponentClass> {} + export function createSubscription(config: SubscriptionConfig): Subscription;