This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
sudo bash -c " cat > /etc/systemd/system/mongodb.service <<EOF | |
[Unit] | |
Description=High-performance, schema-free document-oriented database | |
After=network.target | |
[Service] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ActionCreator, ThunkAction, bindActionCreators,Action, AnyAction } from "@reduxjs/toolkit"; | |
import { useMemo } from "react"; | |
import { useDispatch } from "react-redux"; | |
type BoundActions<Actions extends Array<ActionCreator<unknown>>> = { | |
[K in keyof Actions]: ( | |
...args: Parameters<Actions[K]> | |
) => ReturnType<Actions[K]> extends ThunkAction<infer Return, unknown, unknown, AnyAction> | |
? Return | |
: ReturnType<Actions[K]>; |