@@ -2,11 +2,10 @@ import {alertOpen, hintPositionSet, progressCompletePage} from '../../actions';
22import getTestName from './test-run/testName' ;
33import { TEST_COMPLETE , TEST_LOAD , TEST_RESULT , TEST_RUN } from './types' ;
44
5- export function testLoad ( ) {
5+ export function testLoad ( ) : Redux . ThunkAction < any , any , { } > {
66 return ( dispatch , getState ) : void => {
77 const { dir, pagePosition, tutorial, taskTests } = getState ( ) ;
88 const testFile = getTestName ( { tutorial, pagePosition} ) ;
9-
109 dispatch ( {
1110 type : TEST_LOAD , payload : {
1211 dir,
@@ -18,7 +17,7 @@ export function testLoad() {
1817 } ;
1918}
2019
21- export function testRun ( ) : ReduxThunk . ThunkInterface {
20+ export function testRun ( ) : Redux . ThunkAction < any , any , { } > {
2221 return ( dispatch , getState ) : void => {
2322 // less than a second since the last test run, skip
2423 const timeSinceLastTestRun = performance . now ( ) - getState ( ) . testRun . time ;
@@ -35,7 +34,8 @@ export function testRun(): ReduxThunk.ThunkInterface {
3534 } ;
3635}
3736
38- export function testResult ( result : Test . Result ) : ReduxThunk . ThunkInterface {
37+ export function testResult ( result : Test . Result ) :
38+ Redux . ThunkAction < any , any , { } > {
3939 return ( dispatch , getState ) : void => {
4040 const { taskActions, progress, pagePosition} = getState ( ) ;
4141 const filter : string = getTestFilter ( result ) ;
@@ -76,8 +76,9 @@ function getTestFilter(result: Test.Result): string {
7676 }
7777}
7878
79- export function testComplete ( result : Test . Result ) {
80- return ( dispatch , getState ) : void => {
79+ export function testComplete ( result : Test . Result ) :
80+ Redux . ThunkAction < any , any , { } > {
81+ return ( dispatch ) : void => {
8182 switch ( true ) {
8283 // all complete
8384 case result . completed :
0 commit comments