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


TypeScript Observable.timer方法代码示例

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


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

示例1: create

	// We will simulate it too with a timer
	private create(text: string) {
		Observable.timer(1000)
			.take(1)
			.subscribe(() => {
				this.todos = this.todos.push(Map({ text }));
			})
	}
开发者ID:QuinntyneBrown,项目名称:todoapp,代码行数:8,代码来源:TodoStore.ts

示例2: checkPanel

        function checkPanel(): any {
            const panels = atom.workspace.getModalPanels();
            if (panels.length) {
                const panelItem: GenericSelectListView = panels[0].item;
                expect(panelItem._items.length).to.be.eql(2);

                panelItem.onConfirm(panelItem._items[0].name);

                return p;
            } else {
                return Observable.timer(100).toPromise()
                    .then(() => checkPanel());
            }
        }
开发者ID:Coohack,项目名称:omnisharp-atom,代码行数:14,代码来源:solution-manager-spec.ts

示例3:

 .buffer(newModel.observe.updates.throttle(100), () => Observable.timer(100)) // Group the changes so that we capture all the differences at once.
开发者ID:RichiCoder1,项目名称:omnisharp-atom,代码行数:1,代码来源:world.ts


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