File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ describe('DevtoolsExtension', () => {
170170 const SANITIZED_COUNTER = 42 ;
171171
172172 function createPerformAction ( ) {
173- return new PerformAction ( { type : UNSANITIZED_TOKEN } ) ;
173+ return new PerformAction ( { type : UNSANITIZED_TOKEN } , + Date . now ( ) ) ;
174174 }
175175
176176 function testActionSanitizer ( action : Action , id : number ) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const IMPORT_STATE = 'IMPORT_STATE';
1414export class PerformAction implements Action {
1515 readonly type = PERFORM_ACTION ;
1616
17- constructor ( public action : Action , public timestamp ? : number ) {
17+ constructor ( public action : Action , public timestamp : number ) {
1818 if ( typeof action . type === 'undefined' ) {
1919 throw new Error (
2020 'Actions may not have an undefined "type" property. ' +
@@ -27,19 +27,19 @@ export class PerformAction implements Action {
2727export class Reset implements Action {
2828 readonly type = RESET ;
2929
30- constructor ( public timestamp ? : number ) { }
30+ constructor ( public timestamp : number ) { }
3131}
3232
3333export class Rollback implements Action {
3434 readonly type = ROLLBACK ;
3535
36- constructor ( public timestamp ? : number ) { }
36+ constructor ( public timestamp : number ) { }
3737}
3838
3939export class Commit implements Action {
4040 readonly type = COMMIT ;
4141
42- constructor ( public timestamp ? : number ) { }
42+ constructor ( public timestamp : number ) { }
4343}
4444
4545export class Sweep implements Action {
Original file line number Diff line number Diff line change @@ -119,19 +119,19 @@ export class StoreDevtools implements Observer<any> {
119119 complete ( ) { }
120120
121121 performAction ( action : any ) {
122- this . dispatch ( new Actions . PerformAction ( action ) ) ;
122+ this . dispatch ( new Actions . PerformAction ( action , + Date . now ( ) ) ) ;
123123 }
124124
125125 reset ( ) {
126- this . dispatch ( new Actions . Reset ( ) ) ;
126+ this . dispatch ( new Actions . Reset ( + Date . now ( ) ) ) ;
127127 }
128128
129129 rollback ( ) {
130- this . dispatch ( new Actions . Rollback ( ) ) ;
130+ this . dispatch ( new Actions . Rollback ( + Date . now ( ) ) ) ;
131131 }
132132
133133 commit ( ) {
134- this . dispatch ( new Actions . Commit ( ) ) ;
134+ this . dispatch ( new Actions . Commit ( + Date . now ( ) ) ) ;
135135 }
136136
137137 sweep ( ) {
Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ export function liftReducerWith(
392392
393393 // Add a new action to only recompute state
394394 const actionId = nextActionId ++ ;
395- actionsById [ actionId ] = new PerformAction ( liftedAction ) ;
395+ actionsById [ actionId ] = new PerformAction ( liftedAction , + Date . now ( ) ) ;
396396 stagedActionIds = [ ...stagedActionIds , actionId ] ;
397397
398398 minInvalidatedStateIndex = stagedActionIds . length - 1 ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function unliftAction(liftedState: LiftedState): LiftedAction {
3232 * Lifts an app's action into an action on the lifted store.
3333 */
3434export function liftAction ( action : Action ) {
35- return new Actions . PerformAction ( action ) ;
35+ return new Actions . PerformAction ( action , + Date . now ( ) ) ;
3636}
3737
3838/**
You can’t perform that action at this time.
0 commit comments