Skip to content

Commit

Permalink
@uppy/set-state: fix types
Browse files Browse the repository at this point in the history
Co-authored-by: Murderlon <merlijn@soverin.net>
  • Loading branch information
aduh95 and Murderlon committed Dec 6, 2023
1 parent ec4bc58 commit b1a7644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@uppy/store-default/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type GenericState = Record<string, unknown>
export type Listener<T> = (
prevState: T,
nextState: T,
patch: Partial<T>,
patch?: Partial<T>,
) => void

/**
Expand All @@ -24,7 +24,7 @@ class DefaultStore<T extends GenericState = GenericState> {
return this.state
}

setState(patch: Partial<T>): void {
setState(patch?: Partial<T>): void {
const prevState = { ...this.state }
const nextState = { ...this.state, ...patch }

Expand Down

0 comments on commit b1a7644

Please sign in to comment.