Skip to content

Commit

Permalink
feat(settings): add strictFunctionTypes to compiler options
Browse files Browse the repository at this point in the history
- update typescript configuration
- eliminate strictFunctionTypes violations

addresses #536
  • Loading branch information
slegge committed Mar 25, 2021
1 parent 3c27481 commit c72a6c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
selectIsAuthenticated,
selectSettingsStickyHeader,
selectSettingsLanguage,
selectEffectiveTheme
selectEffectiveTheme,
AppState
} from '../core/core.module';
import {
actionSettingsChangeAnimationsPageDisabled,
Expand Down Expand Up @@ -50,7 +51,7 @@ export class AppComponent implements OnInit {
theme$: Observable<string> | undefined;

constructor(
private store: Store,
private store: Store<AppState>,
private storageService: LocalStorageService
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class GoogleAnalyticsEffects {
pageView = createEffect(
() => () =>
this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
filter((event): event is NavigationEnd => event instanceof NavigationEnd),
tap((event: NavigationEnd) => {
(<any>window).ga('set', 'page', event.urlAfterRedirects);
(<any>window).ga('send', 'pageview');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { actionFormReset, actionFormUpdate } from '../form.actions';
import { selectFormState } from '../form.selectors';
import { Form } from '../form.model';
import { State } from '../../examples.state';

@Component({
selector: 'anms-form',
Expand Down Expand Up @@ -45,7 +46,7 @@ export class FormComponent implements OnInit {

constructor(
private fb: FormBuilder,
private store: Store,
private store: Store<State>,
private translate: TranslateService,
private notificationService: NotificationService
) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import * as todoActions from '../todos.actions';
import { Todo, TodosFilter } from '../todos.model';
import { selectTodos, selectRemoveDoneTodosDisabled } from '../todos.selectors';
import { State } from '../../examples.state';

@Component({
selector: 'anms-todos',
Expand All @@ -29,7 +30,7 @@ export class TodosContainerComponent implements OnInit {
newTodo = '';

constructor(
public store: Store,
public store: Store<State>,
public snackBar: MatSnackBar,
public translateService: TranslateService,
private notificationService: NotificationService
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"strictNullChecks": true,
"noImplicitAny": true,
"strictPropertyInitialization": true,
"strictFunctionTypes": true,
"module": "esnext",
"target": "es2015",
"typeRoots": ["node_modules/@types"],
Expand Down

0 comments on commit c72a6c6

Please sign in to comment.