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


TypeScript algorithm.toArray函數代碼示例

本文整理匯總了TypeScript中@phosphor/algorithm.toArray函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript toArray函數的具體用法?TypeScript toArray怎麽用?TypeScript toArray使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: toArray

 manager.refreshRunning().then(() => {
   let running = toArray(manager.running());
   expect(running[0]).to.eql(sessionModels[0]);
   expect(running[1]).to.eql(sessionModels[1]);
   done();
 });
開發者ID:cameronoelsen,項目名稱:jupyterlab,代碼行數:6,代碼來源:manager.spec.ts

示例2: toArray

 return manager.refreshRunning().then(() => {
   let running = toArray(manager.running());
   expect(running.length).to.be.greaterThan(0);
 });
開發者ID:7125messi,項目名稱:jupyterlab,代碼行數:4,代碼來源:manager.spec.ts

示例3: toArray

 shell.layoutModified.connect(() => {
   // If there is only a launcher open, remove the close icon.
   main.title.closable = toArray(shell.widgets('main')).length > 1;
 }, main);
開發者ID:groutr,項目名稱:jupyterlab,代碼行數:4,代碼來源:index.ts

示例4: it

 it('should be removed from the registry when disposed', () => {
   let fileType = { name: 'notebook', extension: '.ipynb' };
   let disposable = registry.addFileType(fileType);
   disposable.dispose();
   expect(toArray(registry.fileTypes()).length).to.be(0);
 });
開發者ID:faricacarroll,項目名稱:jupyterlab,代碼行數:6,代碼來源:registry.spec.ts

示例5: it

 it('should create an iterator for an array-like object', () => {
   expect(toArray(retro([0, 1, 2, 3]))).to.deep.equal([3, 2, 1, 0]);
 });
開發者ID:afshin,項目名稱:phosphor,代碼行數:3,代碼來源:retro.spec.ts

示例6: it

 it('should yield a list of valid kernel ids', async () => {
   const response = await Kernel.listRunning();
   expect(toArray(response).length).to.be.greaterThan(0);
 });
開發者ID:AlbertHilb,項目名稱:jupyterlab,代碼行數:4,代碼來源:kernel.spec.ts

示例7: it

 it('should get the ordered list of mimeTypes', () => {
   expect(toArray(r.mimeTypes()).indexOf('text/html')).to.not.be(-1);
 });
開發者ID:rlugojr,項目名稱:jupyterlab,代碼行數:3,代碼來源:rendermime.spec.ts

示例8: toArray

 () => {
   // If there is only a launcher open, remove the close icon.
   main.title.closable = toArray(labShell.widgets('main')).length > 1;
 },
開發者ID:alexmorley,項目名稱:jupyterlab,代碼行數:4,代碼來源:index.ts

示例9: it

 it('should give an iterator over the list of running models', () => {
   expect(toArray(manager.running())).to.eql(data);
 });
開發者ID:cameronoelsen,項目名稱:jupyterlab,代碼行數:3,代碼來源:manager.spec.ts

示例10: it

 it('should get a list of user metadata keys', () => {
   let model = new CellModel({});
   expect(toArray(model.metadata.keys())).to.be.empty();
   model.metadata.set('foo', 1);
   expect(model.metadata.keys()).to.eql(['foo']);
 });
開發者ID:dalejung,項目名稱:jupyterlab,代碼行數:6,代碼來源:model.spec.ts


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