Convertir to typescript

This commit is contained in:
Leo Giovanetti
2024-02-20 16:52:51 +00:00
parent 3b726d6892
commit 2af0b6e6b7
22 changed files with 483 additions and 395 deletions
+31
View File
@@ -0,0 +1,31 @@
import { Store as PullStateStore } from 'pullstate';
import { lists, homeItems, notifications, settings, TodoListItem, HomeItem, NotificationItem, Settings } from '../mock';
type StoreProps = {
safeAreaTop: number;
safeAreaBottom: number;
menuOpen: boolean;
notificationsOpen: boolean;
currentPage: number | null;
homeItems: HomeItem[];
lists: TodoListItem[];
notifications: NotificationItem[];
settings: Settings;
selectedList: TodoListItem | undefined;
}
const Store = new PullStateStore<StoreProps>({
safeAreaTop: 0,
safeAreaBottom: 0,
menuOpen: false,
notificationsOpen: false,
currentPage: null,
homeItems,
lists,
notifications,
settings,
selectedList: undefined,
});
export default Store;