facebook / facebook/flow

timeoutId does not implement unref() method

Open
#6,735 8 comments 1 reaction 0 assignees View on GitHub
Library definitions
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

```js
/* @flow */

const foo: TimeoutID = setTimeout(() => {}, 300);

foo.unref();

```

```
5: foo.unref();
^ Cannot call `foo.unref` because property `unref` is missing in `TimeoutID` [1].
References:
3: const foo: TimeoutID = setTimeout(() => {}, 300);
^ [1]

```

https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjOA7AzgFzCjjgC4wAVASwFsBTOAV3wEkARMAXjFzv2vpN8ACmEBKLgD4wAbwC+AGjABmAAyqxAbnTE4AOkbYATnSjjNQA

Refer to:

* https://nodejs.org/api/timers.html#timers_class_timeout

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.