@lwc/engine-core 8.0.0 → 8.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ import { VM } from "./framework/vm";
2
+ export interface MutationLog {
3
+ vm: VM;
4
+ key: PropertyKey;
5
+ }
6
+ export declare function getAndFlushMutationLogs(): MutationLog[];
7
+ export declare function logMutation(vm: VM, key: PropertyKey): void;
@@ -0,0 +1,2 @@
1
+ export declare function isAdvancedInstrumentationEnabled(): boolean;
2
+ export declare function onAdvancedInstrumentationEnabledOrDisabled(listener: (enabled: boolean) => void): void;
@@ -0,0 +1,7 @@
1
+ import { VM } from "./vm";
2
+ export interface MutationLog {
3
+ vm: VM;
4
+ key: PropertyKey;
5
+ }
6
+ export declare function getAndFlushMutationLogs(): MutationLog[];
7
+ export declare function logMutation(vm: VM, key: PropertyKey): void;
@@ -0,0 +1,34 @@
1
+ import { ReactiveObserver } from '../libs/mutation-tracker';
2
+ import { VM } from './vm';
3
+ export interface MutationLog {
4
+ vm: VM;
5
+ prop: string;
6
+ }
7
+ /**
8
+ * Flush all the logs we've written so far and return the current logs.
9
+ */
10
+ export declare function getAndFlushMutationLogs(): MutationLog[];
11
+ /**
12
+ * Log a new mutation for this reactive observer.
13
+ * @param reactiveObserver - relevant ReactiveObserver
14
+ * @param target - target object that is being observed
15
+ * @param key - key (property) that was mutated
16
+ */
17
+ export declare function logMutation(reactiveObserver: ReactiveObserver, target: object, key: PropertyKey): void;
18
+ /**
19
+ * Flush logs associated with a given VM.
20
+ * @param vm - given VM
21
+ */
22
+ export declare function flushMutationLogsForVM(vm: VM): void;
23
+ /**
24
+ * Mark this ReactiveObserver as related to this VM. This is only needed for mutation tracking in dev mode.
25
+ * @param reactiveObserver
26
+ * @param vm
27
+ */
28
+ export declare function associateReactiveObserverWithVM(reactiveObserver: ReactiveObserver, vm: VM): void;
29
+ /**
30
+ * Deeply track all objects in a target and associate with a given key.
31
+ * @param key - key associated with the object in the component
32
+ * @param target - tracked target object
33
+ */
34
+ export declare function trackTargetForMutationLogging(key: PropertyKey, target: any): void;
@@ -1,4 +1,5 @@
1
1
  import { RenderMode, ShadowMode, VM } from './vm';
2
+ import type { MutationLog } from './mutation-logger';
2
3
  export declare const enum OperationId {
3
4
  Constructor = 0,
4
5
  Render = 1,
@@ -24,6 +25,8 @@ export declare const profilerControl: {
24
25
  };
25
26
  export declare function logOperationStart(opId: OperationId, vm: VM): void;
26
27
  export declare function logOperationEnd(opId: OperationId, vm: VM): void;
27
- export declare function logGlobalOperationStart(opId: GlobalOperationId, vm?: VM): void;
28
- export declare function logGlobalOperationEnd(opId: GlobalOperationId, vm?: VM): void;
28
+ export declare function logGlobalOperationStart(opId: GlobalOperationId): void;
29
+ export declare function logGlobalOperationStartWithVM(opId: GlobalOperationId, vm: VM): void;
30
+ export declare function logGlobalOperationEnd(opId: GlobalOperationId, mutationLogs: MutationLog[] | undefined): void;
31
+ export declare function logGlobalOperationEndWithVM(opId: GlobalOperationId, vm: VM): void;
29
32
  export {};
@@ -0,0 +1,2 @@
1
+ export declare function isAdvancedInstrumentationEnabled(): boolean;
2
+ export declare function onAdvancedInstrumentationEnabledOrDisabled(listener: (enabled: boolean) => void): void;
@@ -0,0 +1,7 @@
1
+ import { VM } from "../../framework/vm";
2
+ export interface MutationLog {
3
+ vm: VM;
4
+ key: PropertyKey;
5
+ }
6
+ export declare function getAndFlushMutationLogs(): MutationLog[];
7
+ export declare function logMutation(vm: VM, key: PropertyKey): void;