Skip to content

Commit

Permalink
Undeprecated transaction, fixes #1139
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Sep 18, 2017
1 parent 0dcc1fb commit 6517a50
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/api/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { deprecated } from "../utils/utils"
import { executeAction } from "../core/action"
import { getMessage } from "../utils/messages"

/**
* @deprecated
Expand All @@ -13,7 +12,6 @@ import { getMessage } from "../utils/messages"
* @returns any value that was returned by the 'action' parameter.
*/
export function transaction<T>(action: () => T, thisArg = undefined): T {
deprecated(getMessage("m023"))
return runInTransaction.apply(undefined, arguments)
}

Expand Down
1 change: 0 additions & 1 deletion src/utils/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const messages = {
m020: "modifiers can only be used for individual object properties",
m021: "observable expects zero or one arguments",
m022: "@observable can not be used on getters, use @computed instead",
m023: "Using `transaction` is deprecated, use `runInAction` or `(@)action` instead.",
m024:
"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",
m025: "whyRun can only be used on reactions and computed values",
Expand Down

0 comments on commit 6517a50

Please sign in to comment.