Typescript等到条件将元素推入数组中

时间:2019-04-23 13:05:14

标签: angular typescript wait

我需要帮助解决此问题:在设置的时间后,我将以这种方式推送和删除数组中的元素:

alpha@GHOST-RIDER:~/GoWorkspace/src/github.com/hyperledger/firstproject$ go build
# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations
../fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop
    have (<-chan time.Time, string, string)
    want (context.Context, <-chan time.Time, string, string)

getTimer返回基于消息长度的值。仅当数组长度小于4时,才需要在数组中推送元素;否则,我需要等到元素删除且长度变为3时,才能在数组中推送元素。 有没有办法做到这一点? 谢谢

0 个答案:

没有答案