Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Action } from '@ngrx/store';
- import { LanguageCodes } from 'app/ui/models';
- export const SET_DEFAULT_LOCALE: string = `[UI] Set Default Locale`;
- export const SET_CURRENT_LOCALE: string = `[UI] Set Current Locale`;
- export const SET_CURRENT_LOCALE_SUCCESS: string = `[UI] Set Current Locale Success`;
- export const SET_CURRENT_LOCALE_FAILURE: string = `[UI] Set Current Locale Failure`;
- export class SetDefaultLocale implements Action {
- readonly type: string = SET_DEFAULT_LOCALE;
- constructor(public payload: { locale: LanguageCodes }) { }
- }
- export class SetCurrentLocale implements Action {
- readonly type: string = SET_CURRENT_LOCALE;
- constructor(public payload: { locale: LanguageCodes }) { }
- }
- export class SetCurrentLocaleSuccess implements Action {
- readonly type: string = SET_CURRENT_LOCALE_SUCCESS;
- constructor(public payload: { locale: LanguageCodes }) { }
- }
- export class SetCurrentLocaleFailure implements Action {
- readonly type: string = SET_CURRENT_LOCALE_FAILURE;
- constructor(public payload: { error: Error }) { }
- }
- export type ActionsUnion
- = SetDefaultLocale
- | SetCurrentLocale
- | SetCurrentLocaleSuccess
- | SetCurrentLocaleFailure;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement