reduce duplication and code improvements (#1707)

* reduce code duplication

* reduce duplication, fix license headers

* simplify code

* typings fixes

* update tests

* minor fixes

* markdown fixes

* revert changes
This commit is contained in:
Denys Vuika
2020-12-11 15:47:17 +00:00
committed by GitHub
parent b71e1530d1
commit 7a5350a06d
64 changed files with 482 additions and 744 deletions

View File

@@ -67,15 +67,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
@Injectable()
export class AppEffects {
constructor(...) {}
@Effect({ dispatch: false })
showMyDialog$ = this.actions$.pipe(
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
map(() => {})
);
// ...
}
```
@@ -91,10 +87,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
@Injectable()
export class AppEffects {
constructor(
...,
private dialog: MatDialog
) {}
constructor(private dialog: MatDialog) {}
@Effect({ dispatch: false })
showMyDialog$ = this.actions$.pipe(
@@ -103,9 +96,6 @@ export class AppEffects {
this.dialog.open(MyExtensionDialogComponent)
})
);
...
}
```