a bit of types

This commit is contained in:
Primakov Alexandr Alexandrovich
2024-11-12 20:18:36 +03:00
parent fd0eb66563
commit 0f211115cf
4 changed files with 12 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
export const createStore = (initialState) => {
let state = initialState
export const createStore = <StateType>(initialState: StateType) => {
let state: StateType = initialState
const listeners = new Set<() => void>()
return {