Skip to content

Commit

Permalink
Restore generic types on IValueDidChange and IBoxDidChange. (#3609)
Browse files Browse the repository at this point in the history
Co-authored-by: Gorbachev Egor <7gorbachevm@gmail.com>
  • Loading branch information
emereum and kubk committed Jan 12, 2023
1 parent fed3ff1 commit 7095fa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-numbers-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mobx": patch
---

Restore generic types for newValue and oldValue on IValueDidChange and IBoxDidChange.
6 changes: 3 additions & 3 deletions packages/mobx/src/types/observablevalue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ export type IValueDidChange<T = any> = {
observableKind: "value"
object: IObservableValue<T>
debugObjectName: string
newValue: unknown
oldValue: unknown
newValue: T
oldValue: T | undefined
}
export type IBoxDidChange<T = any> =
| {
type: "create"
observableKind: "value"
object: IObservableValue<T>
debugObjectName: string
newValue: unknown
newValue: T
}
| IValueDidChange<T>

Expand Down

0 comments on commit 7095fa4

Please sign in to comment.