Version 1.0.2 mit node_modules Verzeichnis

This commit is contained in:
ISA
2024-10-02 07:58:24 +02:00
parent f353a06b1b
commit 62b6e55a0a
68228 changed files with 4548477 additions and 651 deletions

42
node_modules/redux-thunk/dist/cjs/redux-thunk.cjs generated vendored Normal file
View File

@@ -0,0 +1,42 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
thunk: () => thunk,
withExtraArgument: () => withExtraArgument
});
module.exports = __toCommonJS(src_exports);
function createThunkMiddleware(extraArgument) {
const middleware = ({ dispatch, getState }) => (next) => (action) => {
if (typeof action === "function") {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
return middleware;
}
var thunk = createThunkMiddleware();
var withExtraArgument = createThunkMiddleware;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
thunk,
withExtraArgument
});

60
node_modules/redux-thunk/dist/redux-thunk.d.ts generated vendored Normal file
View File

@@ -0,0 +1,60 @@
import { Action, AnyAction, Middleware } from 'redux';
/**
* The dispatch method as modified by React-Thunk; overloaded so that you can
* dispatch:
* - standard (object) actions: `dispatch()` returns the action itself
* - thunk actions: `dispatch()` returns the thunk's return value
*
* @template State The redux state
* @template ExtraThunkArg The extra argument passed to the inner function of
* thunks (if specified when setting up the Thunk middleware)
* @template BasicAction The (non-thunk) actions that can be dispatched.
*/
interface ThunkDispatch<State, ExtraThunkArg, BasicAction extends Action> {
/** Accepts a thunk function, runs it, and returns whatever the thunk itself returns */
<ReturnType>(thunkAction: ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>): ReturnType;
/** Accepts a standard action object, and returns that action object */
<Action extends BasicAction>(action: Action): Action;
/** A union of the other two overloads for TS inference purposes */
<ReturnType, Action extends BasicAction>(action: Action | ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>): Action | ReturnType;
}
/**
* A "thunk" action (a callback function that can be dispatched to the Redux
* store.)
*
* Also known as the "thunk inner function", when used with the typical pattern
* of an action creator function that returns a thunk action.
*
* @template ReturnType The return type of the thunk's inner function
* @template State The redux state
* @template ExtraThunkArg Optional extra argument passed to the inner function
* (if specified when setting up the Thunk middleware)
* @template BasicAction The (non-thunk) actions that can be dispatched.
*/
type ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction extends Action> = (dispatch: ThunkDispatch<State, ExtraThunkArg, BasicAction>, getState: () => State, extraArgument: ExtraThunkArg) => ReturnType;
/**
* A generic type that takes a thunk action creator and returns a function
* signature which matches how it would appear after being processed using
* bindActionCreators(): a function that takes the arguments of the outer
* function, and returns the return type of the inner "thunk" function.
*
* @template ActionCreator Thunk action creator to be wrapped
*/
type ThunkActionDispatch<ActionCreator extends (...args: any[]) => ThunkAction<any, any, any, any>> = (...args: Parameters<ActionCreator>) => ReturnType<ReturnType<ActionCreator>>;
/**
* @template State The redux state
* @template BasicAction The (non-thunk) actions that can be dispatched
* @template ExtraThunkArg An optional extra argument to pass to a thunk's
* inner function. (Only used if you call `withExtraArgument()`)
*/
type ThunkMiddleware<State = any, BasicAction extends Action = AnyAction, ExtraThunkArg = undefined> = Middleware<ThunkDispatch<State, ExtraThunkArg, BasicAction>, State, ThunkDispatch<State, ExtraThunkArg, BasicAction>>;
/** A function that accepts a potential "extra argument" value to be injected later,
* and returns an instance of the thunk middleware that uses that value
*/
declare function createThunkMiddleware<State = any, BasicAction extends Action = AnyAction, ExtraThunkArg = undefined>(extraArgument?: ExtraThunkArg): ThunkMiddleware<State, BasicAction, ExtraThunkArg>;
declare const thunk: ThunkMiddleware<any, AnyAction, undefined>;
declare const withExtraArgument: typeof createThunkMiddleware;
export { ThunkAction, ThunkActionDispatch, ThunkDispatch, ThunkMiddleware, thunk, withExtraArgument };

View File

@@ -0,0 +1,16 @@
// src/index.ts
function createThunkMiddleware(extraArgument) {
const middleware = ({ dispatch, getState }) => (next) => (action) => {
if (typeof action === "function") {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
return middleware;
}
var thunk = createThunkMiddleware();
var withExtraArgument = createThunkMiddleware;
export {
thunk,
withExtraArgument
};

16
node_modules/redux-thunk/dist/redux-thunk.mjs generated vendored Normal file
View File

@@ -0,0 +1,16 @@
// src/index.ts
function createThunkMiddleware(extraArgument) {
const middleware = ({ dispatch, getState }) => (next) => (action) => {
if (typeof action === "function") {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
return middleware;
}
var thunk = createThunkMiddleware();
var withExtraArgument = createThunkMiddleware;
export {
thunk,
withExtraArgument
};