本文整理匯總了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();
});
示例2: toArray
return manager.refreshRunning().then(() => {
let running = toArray(manager.running());
expect(running.length).to.be.greaterThan(0);
});
示例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);
示例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);
});
示例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]);
});
示例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);
});
示例7: it
it('should get the ordered list of mimeTypes', () => {
expect(toArray(r.mimeTypes()).indexOf('text/html')).to.not.be(-1);
});
示例8: toArray
() => {
// If there is only a launcher open, remove the close icon.
main.title.closable = toArray(labShell.widgets('main')).length > 1;
},
示例9: it
it('should give an iterator over the list of running models', () => {
expect(toArray(manager.running())).to.eql(data);
});
示例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']);
});