]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: red warn
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 8 Nov 2022 20:35:43 +0000 (21:35 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 8 Nov 2022 20:35:43 +0000 (21:35 +0100)
packages/pinia/src/types.ts

index affb5b18fa71e5d0df9cc3089d6b2ec6cae8b372..52d2e90c0aa5c5d646280d244d65cfb2919c6932 100644 (file)
@@ -79,6 +79,13 @@ export interface _SubscriptionCallbackMutationBase {
    * `id` of the store doing the mutation.
    */
   storeId: string
+
+  /**
+   * ðŸ”´ DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
+   * https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
+   * devtools and plugins **during development only**.
+   */
+  events?: DebuggerEvent[] | DebuggerEvent
 }
 
 /**
@@ -90,9 +97,6 @@ export interface SubscriptionCallbackMutationDirect
   extends _SubscriptionCallbackMutationBase {
   type: MutationType.direct
 
-  /**
-   * DEV ONLY. Different mutation calls.
-   */
   events: DebuggerEvent
 }
 
@@ -104,9 +108,6 @@ export interface SubscriptionCallbackMutationPatchObject<S>
   extends _SubscriptionCallbackMutationBase {
   type: MutationType.patchObject
 
-  /**
-   * DEV ONLY. Array for patch calls.
-   */
   events: DebuggerEvent[]
 
   /**
@@ -123,9 +124,6 @@ export interface SubscriptionCallbackMutationPatchFunction
   extends _SubscriptionCallbackMutationBase {
   type: MutationType.patchFunction
 
-  /**
-   * DEV ONLY. Array of all the mutations done inside of the callback.
-   */
   events: DebuggerEvent[]
 
   /**