How to use the typesafe-actions.createActionDeprecated function in typesafe-actions

To help you get started, we’ve selected a few typesafe-actions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
// NOTE(miguel) Typescript types ignored since this file will be removed
import { Dispatch } from "redux";
import { ActionType, createActionDeprecated } from "typesafe-actions";

import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";

export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
  "RECEIVE_FUNCTIONS",
  (functions: IFunction[]) => ({
    functions,
    type: "RECEIVE_FUNCTIONS",
  }),
);
export const errorFunctions = createActionDeprecated(
  "ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
// NOTE(miguel) Typescript types ignored since this file will be removed
import { Dispatch } from "redux";
import { ActionType, createActionDeprecated } from "typesafe-actions";

import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";

export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
  "RECEIVE_FUNCTIONS",
  (functions: IFunction[]) => ({
    functions,
    type: "RECEIVE_FUNCTIONS",
  }),
);
export const errorFunctions = createActionDeprecated(
  "ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
export const receiveFunctions = createActionDeprecated(
  "RECEIVE_FUNCTIONS",
  (functions: IFunction[]) => ({
    functions,
    type: "RECEIVE_FUNCTIONS",
  }),
);
export const errorFunctions = createActionDeprecated(
  "ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
  type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
  name,
  type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
  "RECEIVE_RUNTIMES",
  (runtimes: IRuntime[]) => ({
    runtimes,
    type: "RECEIVE_RUNTIMES",
  }),
);
const allActions = [
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
type: "RECEIVE_FUNCTIONS",
  }),
);
export const errorFunctions = createActionDeprecated(
  "ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
  type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
  name,
  type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
  "RECEIVE_RUNTIMES",
  (runtimes: IRuntime[]) => ({
    runtimes,
    type: "RECEIVE_RUNTIMES",
  }),
);
const allActions = [
  requestFunctions,
  receiveFunctions,
  requestRuntimes,
  receiveRuntimes,
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
import { ActionType, createActionDeprecated } from "typesafe-actions";

import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";

export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
  "RECEIVE_FUNCTIONS",
  (functions: IFunction[]) => ({
    functions,
    type: "RECEIVE_FUNCTIONS",
  }),
);
export const errorFunctions = createActionDeprecated(
  "ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
  type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
  name,
  type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
  type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
  name,
  type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
  "RECEIVE_RUNTIMES",
  (runtimes: IRuntime[]) => ({
    runtimes,
    type: "RECEIVE_RUNTIMES",
  }),
);
const allActions = [
  requestFunctions,
  receiveFunctions,
  requestRuntimes,
  receiveRuntimes,
  errorFunctions,
  selectFunction,
  setPodName,
];
export type FunctionsAction = ActionType;
github kubeapps / kubeapps / dashboard / src / actions / functions.ts View on Github external
"ERROR_FUNCTIONS",
  (err: Error, op: "create" | "update" | "fetch" | "delete") => ({
    err,
    op,
    type: "ERROR_FUNCTIONS",
  }),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
  f,
  type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
  name,
  type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
  "RECEIVE_RUNTIMES",
  (runtimes: IRuntime[]) => ({
    runtimes,
    type: "RECEIVE_RUNTIMES",
  }),
);
const allActions = [
  requestFunctions,
  receiveFunctions,
  requestRuntimes,
  receiveRuntimes,
  errorFunctions,
  selectFunction,
  setPodName,
];