Skip to content

Commit

Permalink
Convert reactBatchedUpdates to TypeScript (#1746)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMunoz committed Jun 30, 2021
1 parent d56c262 commit c3764dd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
25 changes: 25 additions & 0 deletions src/global.d.ts
@@ -0,0 +1,25 @@
declare module 'react-dom' {
export function unstable_batchedUpdates<A, B>(
callback: (a: A, b: B) => any,
a: A,
b: B
): void
export function unstable_batchedUpdates<A>(
callback: (a: A) => any,
a: A
): void
export function unstable_batchedUpdates(callback: () => any): void
}

declare module 'react-native' {
export function unstable_batchedUpdates<A, B>(
callback: (a: A, b: B) => any,
a: A,
b: B
): void
export function unstable_batchedUpdates<A>(
callback: (a: A) => any,
a: A
): void
export function unstable_batchedUpdates(callback: () => any): void
}
File renamed without changes.
@@ -1,2 +1 @@
/* eslint-disable import/no-unresolved */
export { unstable_batchedUpdates } from 'react-dom'

0 comments on commit c3764dd

Please sign in to comment.