MCPcopy Index your code
hub / github.com/lit/lit / _performTask

Method _performTask

packages/task/src/task.ts:291–302  ·  view source on GitHub ↗

* Determines if the task should run when it's triggered because of a * host update, and runs the task if it should. * * A task should run when its arguments change from the previous run, based on * the args equality function. * * This method is side-effectful: it stores the new arg

()

Source from the content-addressed store, hash-verified

289 * This method is side-effectful: it stores the new args as the previous args.
290 */
291 private async _performTask() {
292 const args = this._getArgs();
293 const prev = this._previousArgs;
294 this._previousArgs = args;
295 if (
296 args !== prev &&
297 args !== undefined &&
298 (prev === undefined || !this._argsEqual(prev, args))
299 ) {
300 await this.run(args);
301 }
302 }
303
304 /**
305 * Runs a task manually.

Callers 2

hostUpdateMethod · 0.95
hostUpdatedMethod · 0.95

Calls 2

_getArgsMethod · 0.95
runMethod · 0.95

Tested by

no test coverage detected