Summary:
Changelog: [Internal]

This diff
- add `queueMicrotask` to eslint and metro so it's globally available.
- add `queueMicrotask` to the global libdef of react native so the type
  is available to `global.queueMicrotask` (which is common) as well.

Reviewed By: yungsters

Differential Revision: D30158144

fbshipit-source-id: 00a62193b838745c91179ff1e983636200560690
This commit is contained in:
Xuan Huang 2021-08-26 01:05:06 -07:00 коммит произвёл Facebook GitHub Bot
Родитель e60ad0837e
Коммит a8e2415a91
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -49,6 +49,10 @@ declare var global: {
+requestIdleCallback: typeof requestIdleCallback,
+cancelIdleCallback: typeof cancelIdleCallback,
+setTimeout: typeof setTimeout,
// TODO(T97509743): use `typeof` when the next Flow release is available.
+queueMicrotask: <TArguments: Array<mixed>>(
jobCallback: (...args: TArguments) => mixed,
) => void;
+console: typeof console,

Просмотреть файл

@ -114,6 +114,7 @@ module.exports = {
setImmediate: true,
setInterval: false,
setTimeout: false,
queueMicrotask: true,
URL: false,
URLSearchParams: false,
WebSocket: true,