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;