11import { noop } from '@internal/listenerMiddleware/utils'
2- import { delay } from '@internal/utils'
2+ import { delay , promiseWithResolvers } from '@internal/utils'
33import type { CreateAsyncThunkFunction , UnknownAction } from '@reduxjs/toolkit'
44import {
55 configureStore ,
@@ -1014,7 +1014,7 @@ describe('dispatch config', () => {
10141014 test ( 'accepts external signal' , async ( ) => {
10151015 const asyncThunk = createAsyncThunk ( 'test' , async ( _ : void , { signal } ) => {
10161016 signal . throwIfAborted ( )
1017- const { promise, reject } = Promise . withResolvers ( )
1017+ const { promise, reject } = promiseWithResolvers < never > ( )
10181018 signal . addEventListener ( 'abort' , ( ) => reject ( signal . reason ) )
10191019 return promise
10201020 } )
@@ -1031,7 +1031,7 @@ describe('dispatch config', () => {
10311031 test ( 'handles already aborted external signal' , async ( ) => {
10321032 const asyncThunk = createAsyncThunk ( 'test' , async ( _ : void , { signal } ) => {
10331033 signal . throwIfAborted ( )
1034- const { promise, reject } = Promise . withResolvers ( )
1034+ const { promise, reject } = promiseWithResolvers < never > ( )
10351035 signal . addEventListener ( 'abort' , ( ) => reject ( signal . reason ) )
10361036 return promise
10371037 } )
0 commit comments