當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript MapLike.delete方法代碼示例

本文整理匯總了TypeScript中map-like.MapLike.delete方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript MapLike.delete方法的具體用法?TypeScript MapLike.delete怎麽用?TypeScript MapLike.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在map-like.MapLike的用法示例。


在下文中一共展示了MapLike.delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: LogChunk

 const onCompleteUseCase = (payload: CompletedPayload, meta: DispatcherPayloadMeta) => {
     const useCase = meta.useCase;
     if (!useCase) {
         return;
     }
     const resultValue = payload.value;
     const logGroup = this.useCaseLogGroupMap.get(useCase);
     if (!logGroup) {
         console.warn("Warning(almin-logger): logGroup is not found. please report as issue.", payload, meta);
         return;
     }
     logGroup.addChunk(
         new LogChunk({
             useCase,
             payload,
             log: [`${useCase.name} is completed:`, resultValue],
             timeStamp: meta.timeStamp
         })
     );
     const transactionLogGroup = getTransactionLogGroup(meta);
     if (!transactionLogGroup) {
         outputLogging(logGroup);
     }
     this.useCaseLogGroupMap.delete(useCase);
 };
開發者ID:almin,項目名稱:almin,代碼行數:25,代碼來源:AsyncLogger.ts

示例2: getTransactionLogGroup

 const onEndTransaction = (_payload: TransactionEndedPayload, meta: DispatcherPayloadMeta) => {
     if (!meta.transaction) {
         console.warn("meta.transaction is missing");
         return;
     }
     const logGroup = getTransactionLogGroup(meta);
     if (logGroup) {
         outputLogging(logGroup);
     }
     this._transactionMap.delete(meta.transaction.id);
 };
開發者ID:almin,項目名稱:almin,代碼行數:11,代碼來源:AsyncLogger.ts

示例3: close

 /**
  * End transaction of the useCaseExecutor/UseCase
  */
 close(useCaseExecutor: UseCaseExecutor<any>) {
     const unsubscribe = this.unsubscribeMap.get(useCaseExecutor);
     if (typeof unsubscribe !== "function") {
         console.error(
             "Warning(UnitOfWork): This UseCaseExecutor is not opened or already closed.",
             useCaseExecutor
         );
         return;
     }
     unsubscribe();
     this.unsubscribeMap.delete(useCaseExecutor);
 }
開發者ID:almin,項目名稱:almin,代碼行數:15,代碼來源:UseCaseUnitOfWork.ts

示例4: finishedCallback

 dispatcher.onDispatch((payload, meta) => {
     if (payload instanceof DidExecutedPayload && meta.useCase && meta.isUseCaseFinished) {
         calledMap.set(meta.useCase.id, true);
         finishedCallback();
     } else if (payload instanceof CompletedPayload && meta.useCase && meta.isUseCaseFinished) {
         if (calledMap.has(meta.useCase.id)) {
             return void calledMap.delete(meta.useCase.id);
         }
         finishedCallback();
     }
     return;
 });
開發者ID:almin,項目名稱:almin,代碼行數:12,代碼來源:DispatcherPayloadMeta-test.ts


注:本文中的map-like.MapLike.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。