@fluidframework/task-manager 2.60.0 → 2.61.0-355054
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.
- package/.mocharc.cjs +1 -2
- package/dist/interfaces.d.ts +3 -5
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/legacy.d.ts +2 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/taskManager.d.ts +21 -7
- package/dist/taskManager.d.ts.map +1 -1
- package/dist/taskManager.js +266 -170
- package/dist/taskManager.js.map +1 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/interfaces.d.ts +3 -5
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/legacy.d.ts +2 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/taskManager.d.ts +21 -7
- package/lib/taskManager.d.ts.map +1 -1
- package/lib/taskManager.js +253 -157
- package/lib/taskManager.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +38 -25
- package/src/interfaces.ts +3 -5
- package/src/packageVersion.ts +1 -1
- package/src/taskManager.ts +293 -178
package/.mocharc.cjs
CHANGED
package/dist/interfaces.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface ITaskManagerEvents extends ISharedObjectEvents {
|
|
|
18
18
|
/**
|
|
19
19
|
* Fires when a task has been exclusively assigned to the client.
|
|
20
20
|
*
|
|
21
|
-
* @remarks Does not account for known pending ops, but instead only reflects the current state.
|
|
21
|
+
* @remarks Does not account for known pending ops, but instead only reflects the current consensus state.
|
|
22
22
|
*
|
|
23
23
|
* @eventProperty
|
|
24
24
|
*/
|
|
@@ -149,14 +149,12 @@ export interface ITaskManager extends ISharedObject<ITaskManagerEvents> {
|
|
|
149
149
|
*/
|
|
150
150
|
abandon(taskId: string): void;
|
|
151
151
|
/**
|
|
152
|
-
* Check whether this client is the current assignee for the task
|
|
153
|
-
* would abandon the assignment.
|
|
152
|
+
* Check whether this client is the current assignee for the task based on the consensus state.
|
|
154
153
|
* @param taskId - Identifier for the task
|
|
155
154
|
*/
|
|
156
155
|
assigned(taskId: string): boolean;
|
|
157
156
|
/**
|
|
158
|
-
* Check whether this client is either the current assignee
|
|
159
|
-
* outstanding ops have been ack'd.
|
|
157
|
+
* Check whether this client is either the current assignee or in queue to become the assignee.
|
|
160
158
|
* @param taskId - Identifier for the task
|
|
161
159
|
*/
|
|
162
160
|
queued(taskId: string): boolean;
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,aAAa,EACb,mBAAmB,EACnB,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC9D;;;;;;OAMG;IACH,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,OAAE;IAEjD;;;;OAIG;IACH,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,OAAE;IAElD;;;;;;OAMG;IACH,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,OAAE;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,MAAM,WAAW,YAAa,SAAQ,aAA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AGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC;CACxB"}
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Describes the event listener format for {@link ITaskManagerEvents} events.\n *\n * @param taskId - The unique identifier of the related task.\n * @legacy @beta\n */\nexport type TaskEventListener = (taskId: string) => void;\n\n/**\n * Events emitted by {@link ITaskManager}.\n * @legacy @beta\n */\nexport interface ITaskManagerEvents extends ISharedObjectEvents {\n\t/**\n\t * Fires when a task has been exclusively assigned to the client.\n\t *\n\t * @remarks Does not account for known pending ops, but instead only reflects the current state.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"assigned\", listener: TaskEventListener);\n\n\t/**\n\t * Fires when a task the client is queued for is completed.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"completed\", listener: TaskEventListener);\n\n\t/**\n\t * Fires when the task assignment is lost by the local client.\n\t *\n\t * @remarks This could be due to the client disconnecting or by manually calling {@link ITaskManager.abandon}.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"lost\", listener: TaskEventListener);\n}\n\n/**\n * A distributed data structure that tracks queues of clients that want to exclusively run a task.\n *\n * @example Creation\n *\n * To create a {@link ITaskManager}, call the static create method:\n *\n * ```typescript\n * const taskManager = TaskManager.create(this.runtime, id);\n * ```\n *\n * @example Usage\n *\n * To volunteer for a task, use the {@link ITaskManager.volunteerForTask} method.\n * This returns a Promise that will resolve once the client has acquired exclusive rights to run the task,\n * or reject if the client is removed from the queue without acquiring the rights.\n *\n * ```typescript\n * taskManager.volunteerForTask(\"NameOfTask\")\n * .then(() => { doTheTask(); })\n * .catch((err) => { console.error(err); });\n * ```\n *\n * Alternatively, you can indefinitely volunteer for a task with the synchronous {@link ITaskManager.subscribeToTask}\n * method. This method does not return a value, therefore you need to rely on eventing to know when you have acquired\n * the rights to run the task (see below).\n *\n * ```typescript\n * taskManager.subscribeToTask(\"NameOfTask\");\n * ```\n *\n * To check if the local client is currently subscribed to a task, use the {@link ITaskManager.subscribed} method.\n *\n * ```typescript\n * if (taskManager.subscribed(\"NameOfTask\")) {\n * console.log(\"This client is currently subscribed to the task.\");\n * }\n * ```\n *\n * To release the rights to the task, use the {@link ITaskManager.abandon} method.\n * The next client in the queue will then get the rights to run the task.\n *\n * ```typescript\n * taskManager.abandon(\"NameOfTask\");\n * ```\n *\n * To inspect your state in the queue, you can use the {@link ITaskManager.queued} and {@link ITaskManager.assigned}\n * methods.\n *\n * ```typescript\n * if (taskManager.queued(\"NameOfTask\")) {\n * console.log(\"This client is somewhere in the queue, potentially even having the task assignment.\");\n * }\n *\n * if (taskManager.assigned(\"NameOfTask\")) {\n * console.log(\"This client currently has the rights to run the task\");\n * }\n * ```\n *\n * To signal to other connected clients that a task is completed, use the {@link ITaskManager.complete} method.\n * This will release all clients from the queue and emit the \"completed\" event.\n *\n * ```typescript\n * taskManager.complete(\"NameOfTask\");\n * ```\n *\n * @example Eventing\n *\n * `ITaskManager` will emit events when a task is assigned to the client, when the task assignment is lost,\n * and when a task was completed by another client.\n *\n * ```typescript\n * taskManager.on(\"assigned\", (taskId: string) => {\n * console.log(`Client was assigned task: ${taskId}`);\n * });\n *\n * taskManager.on(\"lost\", (taskId: string) => {\n * console.log(`Client released task: ${taskId}`);\n * });\n *\n * taskManager.on(\"completed\", (taskId: string) => {\n * console.log(`Another client completed task: ${taskId}`);\n * });\n * ```\n *\n * These can be useful if the logic to volunteer for a task is separated from the logic to perform the task, such as\n * when using {@link ITaskManager.subscribeToTask}.\n *\n * See {@link ITaskManagerEvents} for more details.\n * @legacy @beta\n */\nexport interface ITaskManager extends ISharedObject<ITaskManagerEvents> {\n\t/**\n\t * Volunteer for the task. Returns a promise that resolves `true` if the task is assigned to the local client and\n\t * `false` if the task was completed by another client. It rejects if the local client abandoned the task or\n\t * disconnected while in queue.\n\t * @param taskId - Identifier for the task\n\t */\n\tvolunteerForTask(taskId: string): Promise<boolean>;\n\n\t/**\n\t * Continuously volunteer for the task. Watch the \"assigned\" event to determine if the task is assigned.\n\t * The local client will automatically re-enter the queue if it disconnects.\n\t * @param taskId - Identifier for the task\n\t */\n\tsubscribeToTask(taskId: string): void;\n\n\t/**\n\t * Exit the queue, releasing the task if currently assigned.\n\t * @param taskId - Identifier for the task\n\t */\n\tabandon(taskId: string): void;\n\n\t/**\n\t * Check whether this client is the current assignee for the task
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Describes the event listener format for {@link ITaskManagerEvents} events.\n *\n * @param taskId - The unique identifier of the related task.\n * @legacy @beta\n */\nexport type TaskEventListener = (taskId: string) => void;\n\n/**\n * Events emitted by {@link ITaskManager}.\n * @legacy @beta\n */\nexport interface ITaskManagerEvents extends ISharedObjectEvents {\n\t/**\n\t * Fires when a task has been exclusively assigned to the client.\n\t *\n\t * @remarks Does not account for known pending ops, but instead only reflects the current consensus state.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"assigned\", listener: TaskEventListener);\n\n\t/**\n\t * Fires when a task the client is queued for is completed.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"completed\", listener: TaskEventListener);\n\n\t/**\n\t * Fires when the task assignment is lost by the local client.\n\t *\n\t * @remarks This could be due to the client disconnecting or by manually calling {@link ITaskManager.abandon}.\n\t *\n\t * @eventProperty\n\t */\n\t(event: \"lost\", listener: TaskEventListener);\n}\n\n/**\n * A distributed data structure that tracks queues of clients that want to exclusively run a task.\n *\n * @example Creation\n *\n * To create a {@link ITaskManager}, call the static create method:\n *\n * ```typescript\n * const taskManager = TaskManager.create(this.runtime, id);\n * ```\n *\n * @example Usage\n *\n * To volunteer for a task, use the {@link ITaskManager.volunteerForTask} method.\n * This returns a Promise that will resolve once the client has acquired exclusive rights to run the task,\n * or reject if the client is removed from the queue without acquiring the rights.\n *\n * ```typescript\n * taskManager.volunteerForTask(\"NameOfTask\")\n * .then(() => { doTheTask(); })\n * .catch((err) => { console.error(err); });\n * ```\n *\n * Alternatively, you can indefinitely volunteer for a task with the synchronous {@link ITaskManager.subscribeToTask}\n * method. This method does not return a value, therefore you need to rely on eventing to know when you have acquired\n * the rights to run the task (see below).\n *\n * ```typescript\n * taskManager.subscribeToTask(\"NameOfTask\");\n * ```\n *\n * To check if the local client is currently subscribed to a task, use the {@link ITaskManager.subscribed} method.\n *\n * ```typescript\n * if (taskManager.subscribed(\"NameOfTask\")) {\n * console.log(\"This client is currently subscribed to the task.\");\n * }\n * ```\n *\n * To release the rights to the task, use the {@link ITaskManager.abandon} method.\n * The next client in the queue will then get the rights to run the task.\n *\n * ```typescript\n * taskManager.abandon(\"NameOfTask\");\n * ```\n *\n * To inspect your state in the queue, you can use the {@link ITaskManager.queued} and {@link ITaskManager.assigned}\n * methods.\n *\n * ```typescript\n * if (taskManager.queued(\"NameOfTask\")) {\n * console.log(\"This client is somewhere in the queue, potentially even having the task assignment.\");\n * }\n *\n * if (taskManager.assigned(\"NameOfTask\")) {\n * console.log(\"This client currently has the rights to run the task\");\n * }\n * ```\n *\n * To signal to other connected clients that a task is completed, use the {@link ITaskManager.complete} method.\n * This will release all clients from the queue and emit the \"completed\" event.\n *\n * ```typescript\n * taskManager.complete(\"NameOfTask\");\n * ```\n *\n * @example Eventing\n *\n * `ITaskManager` will emit events when a task is assigned to the client, when the task assignment is lost,\n * and when a task was completed by another client.\n *\n * ```typescript\n * taskManager.on(\"assigned\", (taskId: string) => {\n * console.log(`Client was assigned task: ${taskId}`);\n * });\n *\n * taskManager.on(\"lost\", (taskId: string) => {\n * console.log(`Client released task: ${taskId}`);\n * });\n *\n * taskManager.on(\"completed\", (taskId: string) => {\n * console.log(`Another client completed task: ${taskId}`);\n * });\n * ```\n *\n * These can be useful if the logic to volunteer for a task is separated from the logic to perform the task, such as\n * when using {@link ITaskManager.subscribeToTask}.\n *\n * See {@link ITaskManagerEvents} for more details.\n * @legacy @beta\n */\nexport interface ITaskManager extends ISharedObject<ITaskManagerEvents> {\n\t/**\n\t * Volunteer for the task. Returns a promise that resolves `true` if the task is assigned to the local client and\n\t * `false` if the task was completed by another client. It rejects if the local client abandoned the task or\n\t * disconnected while in queue.\n\t * @param taskId - Identifier for the task\n\t */\n\tvolunteerForTask(taskId: string): Promise<boolean>;\n\n\t/**\n\t * Continuously volunteer for the task. Watch the \"assigned\" event to determine if the task is assigned.\n\t * The local client will automatically re-enter the queue if it disconnects.\n\t * @param taskId - Identifier for the task\n\t */\n\tsubscribeToTask(taskId: string): void;\n\n\t/**\n\t * Exit the queue, releasing the task if currently assigned.\n\t * @param taskId - Identifier for the task\n\t */\n\tabandon(taskId: string): void;\n\n\t/**\n\t * Check whether this client is the current assignee for the task based on the consensus state.\n\t * @param taskId - Identifier for the task\n\t */\n\tassigned(taskId: string): boolean;\n\n\t/**\n\t * Check whether this client is either the current assignee or in queue to become the assignee.\n\t * @param taskId - Identifier for the task\n\t */\n\tqueued(taskId: string): boolean;\n\n\t/**\n\t * Check whether this client is currently subscribed to the task.\n\t * @param taskId - Identifier for the task\n\t */\n\tsubscribed(taskId: string): boolean;\n\n\t/**\n\t * Marks a task as completed and releases all clients from its queue.\n\t * @param taskId - Identifier for the task\n\t */\n\tcomplete(taskId: string): void;\n\n\t/**\n\t * Check whether this client can currently volunteer for a task.\n\t */\n\tcanVolunteer(): boolean;\n}\n"]}
|
package/dist/legacy.d.ts
CHANGED
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/task-manager";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.61.0-355054";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/task-manager";
|
|
11
|
-
exports.pkgVersion = "2.
|
|
11
|
+
exports.pkgVersion = "2.61.0-355054";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/task-manager\";\nexport const pkgVersion = \"2.61.0-355054\";\n"]}
|
package/dist/taskManager.d.ts
CHANGED
|
@@ -25,7 +25,8 @@ export declare class TaskManagerClass extends SharedObject<ITaskManagerEvents> i
|
|
|
25
25
|
private readonly abandonWatcher;
|
|
26
26
|
private readonly connectionWatcher;
|
|
27
27
|
private readonly completedWatcher;
|
|
28
|
-
private
|
|
28
|
+
private readonly rollbackWatcher;
|
|
29
|
+
private nextPendingMessageId;
|
|
29
30
|
/**
|
|
30
31
|
* Tracks the most recent pending op for a given task
|
|
31
32
|
*/
|
|
@@ -34,10 +35,6 @@ export declare class TaskManagerClass extends SharedObject<ITaskManagerEvents> i
|
|
|
34
35
|
* Tracks tasks that are this client is currently subscribed to.
|
|
35
36
|
*/
|
|
36
37
|
private readonly subscribedTasks;
|
|
37
|
-
/**
|
|
38
|
-
* Map to track tasks that have pending complete ops.
|
|
39
|
-
*/
|
|
40
|
-
private readonly pendingCompletedTasks;
|
|
41
38
|
/**
|
|
42
39
|
* Returns the clientId. Will return a placeholder if the runtime is detached and not yet assigned a clientId.
|
|
43
40
|
*/
|
|
@@ -112,8 +109,9 @@ export declare class TaskManagerClass extends SharedObject<ITaskManagerEvents> i
|
|
|
112
109
|
/**
|
|
113
110
|
* Override resubmit core to avoid resubmission on reconnect. On disconnect we accept our removal from the
|
|
114
111
|
* queues, and leave it up to the user to decide whether they want to attempt to re-enter a queue on reconnect.
|
|
112
|
+
* However, we do need to update latestPendingOps to account for the ops we will no longer be processing.
|
|
115
113
|
*/
|
|
116
|
-
protected reSubmitCore(): void;
|
|
114
|
+
protected reSubmitCore(content: unknown, localOpMetadata: number): void;
|
|
117
115
|
/**
|
|
118
116
|
* Process a task manager operation
|
|
119
117
|
*
|
|
@@ -122,7 +120,7 @@ export declare class TaskManagerClass extends SharedObject<ITaskManagerEvents> i
|
|
|
122
120
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
123
121
|
* For messages from a remote client, this will be undefined.
|
|
124
122
|
*/
|
|
125
|
-
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata:
|
|
123
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: number | undefined): void;
|
|
126
124
|
private addClientToQueue;
|
|
127
125
|
private removeClientFromQueue;
|
|
128
126
|
private removeClientFromAllQueues;
|
|
@@ -132,6 +130,22 @@ export declare class TaskManagerClass extends SharedObject<ITaskManagerEvents> i
|
|
|
132
130
|
*/
|
|
133
131
|
private replacePlaceholderInAllQueues;
|
|
134
132
|
private scrubClientsNotInQuorum;
|
|
133
|
+
/**
|
|
134
|
+
* Checks whether this client is currently assigned or in queue to become assigned, while also accounting
|
|
135
|
+
* for the latest pending ops.
|
|
136
|
+
*/
|
|
137
|
+
private queuedOptimistically;
|
|
138
|
+
/**
|
|
139
|
+
* Returns true if the client is detached.
|
|
140
|
+
* This is distinct from !this.isAttached() because `isAttached()` also checks if `this._isBoundToContext`
|
|
141
|
+
* is true. We use `isDetached()` to determine if we should simulate auto-ack behavior for ops, which is
|
|
142
|
+
* mainly concerned with if we have been assigned a real clientId yet.
|
|
143
|
+
*/
|
|
144
|
+
private isDetached;
|
|
135
145
|
protected applyStashedOp(content: unknown): void;
|
|
146
|
+
/**
|
|
147
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.rollback}
|
|
148
|
+
*/
|
|
149
|
+
protected rollback(content: unknown, localOpMetadata: unknown): void;
|
|
136
150
|
}
|
|
137
151
|
//# sourceMappingURL=taskManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskManager.d.ts","sourceRoot":"","sources":["../src/taskManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"taskManager.d.ts","sourceRoot":"","sources":["../src/taskManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EACX,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAG7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EACN,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAiDxE;;;;;GAKG;AACH,qBAAa,gBACZ,SAAQ,YAAY,CAAC,kBAAkB,CACvC,YAAW,YAAY;IAEvB;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAG1D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAE9D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IAEjE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoC;IAEnE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoC;IAEtE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoC;IAErE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAoC;IAEpE,OAAO,CAAC,oBAAoB,CAAa;IACzC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC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