🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-redux-typescript

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-typescript - npm Package Compare versions

Comparing version

to
3.0.0-beta1

es5-commonjs/v2/create-action-creator.d.ts

5

es5-commonjs/index.d.ts
export * from './mapped-types';
export * from './redux-types';
export * from './helpers';
export * from './returntypeof';
export * from './v2/helpers';
export * from 'ts-redux-actions';

4

es5-commonjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./helpers"), exports);
tslib_1.__exportStar(require("./returntypeof"), exports);
tslib_1.__exportStar(require("./v2/helpers"), exports);
tslib_1.__exportStar(require("ts-redux-actions"), exports);
//# sourceMappingURL=index.js.map
export * from './mapped-types';
export * from './redux-types';
export * from './helpers';
export * from './returntypeof';
export * from './v2/helpers';
export * from 'ts-redux-actions';

@@ -1,3 +0,3 @@

export * from './helpers';
export * from './returntypeof';
export * from './v2/helpers';
export * from 'ts-redux-actions';
//# sourceMappingURL=index.js.map
export * from './mapped-types';
export * from './redux-types';
export * from './helpers';
export * from './returntypeof';
export * from './v2/helpers';
export * from 'ts-redux-actions';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./helpers"), exports);
tslib_1.__exportStar(require("./returntypeof"), exports);
tslib_1.__exportStar(require("./v2/helpers"), exports);
tslib_1.__exportStar(require("ts-redux-actions"), exports);
//# sourceMappingURL=index.js.map
{
"name": "react-redux-typescript",
"version": "2.4.0",
"version": "3.0.0-beta1",
"description": "React / Redux / TypeScript Utils",

@@ -20,6 +20,9 @@ "author": "Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)",

"prepublishOnly": "yarn run clean && yarn run reinstall && yarn run check && yarn run test && yarn run build",
"check": "yarn run lint & yarn run tsc",
"lint": "tslint --project tsconfig.json",
"check": "npm run lint & npm run tsc",
"lint": "tslint --project './tsconfig.json'",
"tsc": "tsc -p . --noEmit",
"test": "ts-node -P . tests.ts",
"tsc:watch": "tsc -p . --noEmit -w",
"test": "jest --config jest.config.json",
"test:watch": "jest --config jest.config.json --watch",
"test:v2": "ts-node ./src/v2/helpers-test.ts",
"build": "yarn run build:commonjs & yarn run build:module & yarn run build:jsnext",

@@ -31,10 +34,14 @@ "build:commonjs": "rm -rf es5-commonjs/ && tsc -p . --outDir es5-commonjs/",

"dependencies": {
"redux": "^3.7.2"
"ts-redux-actions": "1.0.0-beta5"
},
"devDependencies": {
"@types/node": "6",
"ts-node": "^3.3.0",
"@types/jest": "21.1.6",
"@types/node": "6.0",
"jest-cli": "21.2.1",
"redux": "^3.7.2",
"ts-jest": "21.2.2",
"ts-node": "3.3.0",
"tslib": "1.8.0",
"tslint": "5.7.0",
"typescript": "2.5.3"
"tslint": "5.8.0",
"typescript": "2.6.1"
},

@@ -41,0 +48,0 @@ "keywords": [

# React / Redux / TypeScript Utils
> Redux helpers for Type-safety (action types, action creators, reducers)
> Utility belt for React + Redux + TypeScript Projects
- Semantic Versioning
- No external dependencies
- 100% test coverage
- output es5 and es6 bundles
- Output separate bundles for your specific workflow needs:
- ES5 + CommonJS - `main`
- ES5 + ES-Modules - `module`
- ES2015 + CommonJS - `jsnext:main`
## Table of Contents (v3.0)
# Table of Contents (v3.0)
### Redux Utils
## TS Redux Actions
> For advanced docs check here: https://github.com/piotrwitek/ts-redux-actions
- [createAction](#createaction)
### Mapped Types
## Mapped Types
- [Diff](#diff)

@@ -17,14 +21,23 @@ - [Omit](#omit)

### Types Utils
## Type Utils
- [getReturnOfExpression](#getreturnofexpression)
> [Docs v2.X](/READMEv2.0.md)
---
Archived docs:
- [Docs v2.X](#READMEv2.0.md)
---
### Redux Utils
## TS Redux Actions
### createAction
```ts
createAction(typeString, creatorFunction?)
typeString: TS extends string,
creatorFunction: (...args: any[]) => { type: TS, payload?: P, meta?: M, error?: boolean }
return: (
(...args: any[]) => { type: TS, payload?: P, meta?: M, error?: boolean }
) & { readonly type: TS }
```

@@ -34,20 +47,24 @@

### Mapped Types
## Mapped Types
#### Diff
### Diff
```ts
// TestDiff expects: ('a' | 'b')
type TestDiff = Diff<'a' | 'b' | 'c', 'c' | 'd'>;
type TestDiff =
Diff<'a' | 'b' | 'c', 'c' | 'd'>;
```
#### Omit
### Omit
```ts
// TestOmit expects: { b: number, c: boolean }
type TestOmit = Omit<{ a: string, b: number, c: boolean }, 'a'>;
type TestOmit =
Omit<{ a: string, b: number, c: boolean }, 'a'>;
```
#### Overwrite
### Overwrite
```ts
// TestOverwrite expects: { b: number, c: boolean } & { a: number }
type TestOverwrite = Overwrite<{ a: string, b: number, c: boolean }, { a: number }>;
type TestOverwrite =
Overwrite<{ a: string, b: number, c: boolean }, { a: number }>;
```

@@ -57,5 +74,5 @@

### Types Utils
## Type Utils
#### getReturnOfExpression
### getReturnOfExpression
> Get return value of an "expression" with inferred return type

@@ -68,7 +85,5 @@ > alias: returntypeof

// (tracking issue: https://github.com/Microsoft/TypeScript/issues/6606)
export function getReturnOfExpression<RT>(
expression: (...params: any[]) => RT,
): RT {
return null as any as RT;
}
function getReturnOfExpression<T>(
expression: (...params: any[]) => T,
): T;

@@ -75,0 +90,0 @@ // Example:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet