Type global queueMicrotask
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:
Родитель
e60ad0837e
Коммит
a8e2415a91
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче