Skip to content

Commit

Permalink
Remove unused generics
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekby committed Nov 28, 2023
1 parent 0274793 commit aa21b04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/deriveState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export type DerivedState<T> = Disposable & EventEmitterBasedState<T>;
export type DerivedNonNullState<T> = Disposable &
EventEmitterBasedNonNullState<T>;

export default function deriveState<I, O, S extends EventEmitterBasedState<I>>(
state: S,
export default function deriveState<I, O>(
state: EventEmitterBasedState<I>,
mapping: (value: I) => O
): DerivedState<O> {
class TempDerivedState
Expand All @@ -32,8 +32,8 @@ export default function deriveState<I, O, S extends EventEmitterBasedState<I>>(
return new TempDerivedState();
}

export function deriveNonNullState<I, O, S extends EventEmitterBasedState<I>>(
state: S,
export function deriveNonNullState<I, O>(
state: EventEmitterBasedState<I>,
mapping: (value: I, self: O) => O,
initailValue: O
): DerivedNonNullState<O> {
Expand All @@ -58,8 +58,8 @@ export function deriveNonNullState<I, O, S extends EventEmitterBasedState<I>>(
return new TempDerivedNonNullState();
}

export function useDerviedState<I, O, S extends EventEmitterBasedState<I>>(
state: S,
export function useDerviedState<I, O>(
state: EventEmitterBasedState<I>,
mapping: (value: I) => O,
onChange: (newValue: O) => void
): Disposable {
Expand Down

0 comments on commit aa21b04

Please sign in to comment.