porting files in lib/ actions, reducers and utils/plugins to ts (#3887)
* add type definitions * rename files in lib/actions * rename files from lib/reducers to ts * renamed plugins.js to ts * Add hyper types * Fix ts errors in lib/reducers * Fix ts errors in lib/actions * Fix ts errors in plugins.ts
This commit is contained in:
parent
27c9cc3892
commit
537c746c75
14 changed files with 479 additions and 280 deletions
17
lib/actions/notifications.ts
Normal file
17
lib/actions/notifications.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
||||
|
||||
export function dismissNotification(id: string) {
|
||||
return {
|
||||
type: NOTIFICATION_DISMISS,
|
||||
id
|
||||
};
|
||||
}
|
||||
|
||||
export function addNotificationMessage(text: string, url: string | null = null, dismissable = true) {
|
||||
return {
|
||||
type: NOTIFICATION_MESSAGE,
|
||||
text,
|
||||
url,
|
||||
dismissable
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue