Skip to content

Commit 930e0f4

Browse files
committed
Convert reactBatchedUpdates to TypeScript
1 parent d56c262 commit 930e0f4

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

src/global.d.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
declare module 'react-dom' {
2+
export function unstable_batchedUpdates<A, B>(
3+
callback: (a: A, b: B) => any,
4+
a: A,
5+
b: B
6+
): void
7+
export function unstable_batchedUpdates<A>(
8+
callback: (a: A) => any,
9+
a: A
10+
): void
11+
export function unstable_batchedUpdates(callback: () => any): void
12+
}
13+
14+
declare module 'react-native' {
15+
export function unstable_batchedUpdates<A, B>(
16+
callback: (a: A, b: B) => any,
17+
a: A,
18+
b: B
19+
): void
20+
export function unstable_batchedUpdates<A>(
21+
callback: (a: A) => any,
22+
a: A
23+
): void
24+
export function unstable_batchedUpdates(callback: () => any): void
25+
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/* eslint-disable import/no-unresolved */
21
export { unstable_batchedUpdates } from 'react-dom'

0 commit comments

Comments
 (0)