面试题 LazyMan 的Rxjs实现方式
2019-01-10
阅读 2 分钟
3.5k实现一个LazyMan,可以按照以下方式调用:LazyMan(“Hank”)输出:Hi! This is Hank!LazyMan(“Hank”).sleep(10).eat(“dinner”)输出Hi! This is Hank!//等待10秒..Wake up after 10Eat dinner~ LazyMan(“Hank”).eat(“dinner”).eat(“supper”)输出Hi This is Hank!Eat dinner~Eat supper~ LazyMan(“Hank”).sleepFirst(5).eat(“s...