Add web app versions of ActionFunc types (#29483)

* Re-export ActionFunc types from mattermost-redux from types/store

* Start using ActionFunc types from types/store instead of mattermost-redux

These are all the places where the type checker failed when I added the
web app version of ActionFunc. I'll move all the other files in a
separate commit.

* Use ActionFunc types from types/store everywhere outside mattermost-redux

* Make types/store versions of ActionFunc use web app GlobalState

* Stop passing GlobalState into ActionFunc explicitly

* Stop casting as GlobalState where it's no longer needed

* Prevent importing mattermost-redux version of ActionFunc in the rest of the app

* Fix no-restricted-imports applying incorrectly to mattermost-redux and types/store
Этот коммит содержится в:
Harrison Healey
2024-12-09 13:37:41 -05:00
коммит произвёл GitHub
родитель 7263ba4bc1
Коммит e873e5c1ef
48 изменённых файлов: 206 добавлений и 166 удалений

Просмотреть файл

@@ -41,6 +41,22 @@
"rules": {
"no-only-tests/no-only-tests": ["error", {"focus": ["only", "skip"]}]
}
},
{
"files": ["*"],
"excludedFiles": ["src/packages/mattermost-redux/**"],
"rules": {
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [{
"name": "mattermost-redux/types/actions",
"importNames": ["DispatchFunc", "GetStateFunc", "ActionFunc", "ActionFuncAsync", "ThunkActionFunc"],
"message": "Use the web app version of it from types/store"
}]
}
]
}
}
]
}