Skip to content

Commit

Permalink
Use correct type letter for store state
Browse files Browse the repository at this point in the history
  • Loading branch information
lkmill committed Apr 5, 2020
1 parent 3f84c15 commit 06663cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions preact.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ declare module 'unistore/preact' {
Child: Preact.ComponentConstructor<T & I & MappedActionCreators<A>, S> | Preact.AnyComponent<T & I & MappedActionCreators<A>, S>
) => Preact.ComponentConstructor<T | T & I, S>;

export interface ProviderProps<T> {
store: Store<T>;
export interface ProviderProps<K> {
store: Store<K>;
}

export class Provider<T> extends Preact.Component<ProviderProps<T>> {
render(props: ProviderProps<T>): Preact.JSX.Element;
export class Provider<K> extends Preact.Component<ProviderProps<K>> {
render(props: ProviderProps<K>): Preact.JSX.Element;
}
}
6 changes: 3 additions & 3 deletions react.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ declare module 'unistore/react' {
Child: ((props: T & I & MappedActionCreators<A>) => React.ReactNode) | React.ComponentClass<T & I & MappedActionCreators<A>, S> | React.FC<T & I & MappedActionCreators<A>>
) => React.ComponentClass<T | T & I, S> | React.FC<T | T & I>;

export interface ProviderProps<T> {
store: Store<T>;
export interface ProviderProps<K> {
store: Store<K>;
}

export class Provider<T> extends React.Component<ProviderProps<T>, {}> {
export class Provider<K> extends React.Component<ProviderProps<K>, {}> {
render(): React.ReactNode;
}

Expand Down

0 comments on commit 06663cb

Please sign in to comment.