mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
parent
518db0303d
commit
b4584a24c7
5
types/react-dom/test-utils/index.d.ts
vendored
5
types/react-dom/test-utils/index.d.ts
vendored
@ -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.
|
||||
|
||||
5
types/react-test-renderer/index.d.ts
vendored
5
types/react-test-renderer/index.d.ts
vendored
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user