mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
+2
-3
@@ -291,9 +291,8 @@ export function createRenderer(): ShallowRenderer;
|
||||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
|
||||
*/
|
||||
// the "void | undefined" is here to forbid any sneaky "Promise" returns.
|
||||
// the actual return value is always a "DebugPromiseLike",
|
||||
// but having an "| {}" makes it harder to accidentally use.
|
||||
export function act(callback: () => void | undefined): DebugPromiseLike | {};
|
||||
// the actual return value is always a "DebugPromiseLike".
|
||||
export function act(callback: () => void | undefined): DebugPromiseLike;
|
||||
|
||||
// Intentionally doesn't extend PromiseLike<never>.
|
||||
// Ideally this should be as hard to accidentally use as possible.
|
||||
|
||||
Vendored
+2
-3
@@ -65,9 +65,8 @@ export function create(nextElement: ReactElement, options?: TestRendererOptions)
|
||||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
|
||||
*/
|
||||
// the "void | undefined" is here to forbid any sneaky "Promise" returns.
|
||||
// the actual return value is always a "DebugPromiseLike",
|
||||
// but having an "| {}" makes it harder to accidentally use.
|
||||
export function act(callback: () => void | undefined): DebugPromiseLike | {};
|
||||
// the actual return value is always a "DebugPromiseLike".
|
||||
export function act(callback: () => void | undefined): DebugPromiseLike;
|
||||
|
||||
// Intentionally doesn't extend PromiseLike<never>.
|
||||
// Ideally this should be as hard to accidentally use as possible.
|
||||
|
||||
Reference in New Issue
Block a user