MCPcopy
hub / github.com/angular/angular / completeOperation

Method completeOperation

packages/service-worker/worker/src/driver.ts:531–548  ·  view source on GitHub ↗
(
    client: Client,
    promise: Promise<boolean>,
    nonce: number,
  )

Source from the content-addressed store, hash-verified

529 }
530
531 private async completeOperation(
532 client: Client,
533 promise: Promise<boolean>,
534 nonce: number,
535 ): Promise<void> {
536 const response = {type: 'OPERATION_COMPLETED', nonce};
537 try {
538 client.postMessage({
539 ...response,
540 result: await promise,
541 });
542 } catch (e) {
543 client.postMessage({
544 ...response,
545 error: (e as Error).toString(),
546 });
547 }
548 }
549
550 async updateClient(client: Client): Promise<boolean> {
551 // Figure out which version the client is on. If it's not on the latest,

Callers 1

handleMessageMethod · 0.95

Calls 2

toStringMethod · 0.65
postMessageMethod · 0.45

Tested by

no test coverage detected