本文整理汇总了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']);
});