Skip to content

Commit 81e1f84

Browse files
committed
Convert reactBatchedUpdates to TypeScript
1 parent 5004e46 commit 81e1f84

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
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,4 +1,3 @@
1-
/* eslint-disable import/named */
21
import { unstable_batchedUpdates } from 'react-native'
32

43
export { unstable_batchedUpdates }
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)