当前位置: 首页>>代码示例>>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;未经允许,请勿转载。