当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ArrayExt.removeFirstOf方法代码示例

本文整理汇总了TypeScript中@phosphor/algorithm.ArrayExt.removeFirstOf方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ArrayExt.removeFirstOf方法的具体用法?TypeScript ArrayExt.removeFirstOf怎么用?TypeScript ArrayExt.removeFirstOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@phosphor/algorithm.ArrayExt的用法示例。


在下文中一共展示了ArrayExt.removeFirstOf方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: _resolve

 /**
  * Resolve a button item.
  */
 private _resolve(item: Dialog.IButton): void {
   // Prevent loopback.
   let promise = this._promise;
   this._promise = null;
   this.close();
   ArrayExt.removeFirstOf(Private.launchQueue, promise.promise);
   promise.resolve(item);
 }
开发者ID:charnpreetsingh185,项目名称:jupyterlab,代码行数:11,代码来源:dialog.ts

示例2: dispose

 /**
  * Dispose of the resources used by the dialog.
  */
 dispose(): void {
   const promise = this._promise;
   if (promise) {
     this._promise = null;
     promise.reject(void 0);
     ArrayExt.removeFirstOf(Private.launchQueue, promise.promise);
   }
   super.dispose();
 }
开发者ID:cameronoelsen,项目名称:jupyterlab,代码行数:12,代码来源:dialog.ts

示例3: dispose

 /**
  * Dispose of the resources used by the dialog.
  */
 dispose(): void {
   if (this._promise) {
     let promise = this._promise;
     this._promise = null;
     promise.resolve(void 0);
     ArrayExt.removeFirstOf(Private.launchQueue, promise.promise);
   }
   super.dispose();
 }
开发者ID:charnpreetsingh185,项目名称:jupyterlab,代码行数:12,代码来源:dialog.ts

示例4: _resolve

 /**
  * Resolve a button item.
  */
 private _resolve(button: Dialog.IButton): void {
   // Prevent loopback.
   const promise = this._promise;
   if (!promise) {
     this.dispose();
     return;
   }
   this._promise = null;
   ArrayExt.removeFirstOf(Private.launchQueue, promise.promise);
   let body = this._body;
   let value: T | null = null;
   if (button.accept && body instanceof Widget && typeof body.getValue === 'function') {
     value = body.getValue();
   }
   this.dispose();
   promise.resolve({ button, value });
 }
开发者ID:cameronoelsen,项目名称:jupyterlab,代码行数:20,代码来源:dialog.ts

示例5: it

 it('should wrap around if stop < start', () => {
   let data = ['one', 'two', 'three', 'four', 'one'];
   let i = ArrayExt.removeFirstOf(data, 'two', 3, 1);
   expect(i).to.equal(1);
   expect(data).to.deep.equal(['one', 'three', 'four', 'one']);
 });
开发者ID:afshin,项目名称:phosphor,代码行数:6,代码来源:array.spec.ts


注:本文中的@phosphor/algorithm.ArrayExt.removeFirstOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。