選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

reducer.ts 659B

123456789101112131415161718192021222324252627282930
  1. import ReducerRegistry from '../base/redux/ReducerRegistry';
  2. import {
  3. SET_NOISE_SUPPRESSION_ENABLED
  4. } from './actionTypes';
  5. export interface INoiseSuppressionState {
  6. enabled: boolean
  7. }
  8. const DEFAULT_STATE = {
  9. enabled: false
  10. };
  11. /**
  12. * Reduces the Redux actions of the feature features/noise-suppression.
  13. */
  14. ReducerRegistry.register('features/noise-suppression', (state: INoiseSuppressionState = DEFAULT_STATE, action: any) => {
  15. const { enabled } = action;
  16. switch (action.type) {
  17. case SET_NOISE_SUPPRESSION_ENABLED:
  18. return {
  19. ...state,
  20. enabled
  21. };
  22. default:
  23. return state;
  24. }
  25. });