Socket
Socket
Sign inDemoInstall

react-redux-typescript

Package Overview
Dependencies
1
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta1 to 3.0.0-rc.0

17

es5-commonjs/mapped-types.d.ts

@@ -1,13 +0,10 @@

export declare type Diff<T extends string, U extends string> = ({
[P in T]: P;
export declare type KeyDiff<T extends string, U extends string> = ({
[K in T]: K;
} & {
[P in U]: never;
[K in U]: never;
} & {
[x: string]: never;
[k: string]: never;
})[T];
export declare type Omit<T, K extends keyof T> = {
[P in Diff<keyof T, K>]: T[P];
};
export declare type Overwrite<T, U> = {
[P in Diff<keyof T, keyof U>]: T[P];
} & U;
export declare type Omit<T, K extends keyof T> = Pick<T, KeyDiff<keyof T, K>>;
export declare type Minus<T, U> = Pick<T, KeyDiff<keyof T, keyof U>>;
export declare type Overwrite<T, U> = Pick<T, KeyDiff<keyof T, keyof U>> & U;

@@ -1,13 +0,10 @@

export declare type Diff<T extends string, U extends string> = ({
[P in T]: P;
export declare type KeyDiff<T extends string, U extends string> = ({
[K in T]: K;
} & {
[P in U]: never;
[K in U]: never;
} & {
[x: string]: never;
[k: string]: never;
})[T];
export declare type Omit<T, K extends keyof T> = {
[P in Diff<keyof T, K>]: T[P];
};
export declare type Overwrite<T, U> = {
[P in Diff<keyof T, keyof U>]: T[P];
} & U;
export declare type Omit<T, K extends keyof T> = Pick<T, KeyDiff<keyof T, K>>;
export declare type Minus<T, U> = Pick<T, KeyDiff<keyof T, keyof U>>;
export declare type Overwrite<T, U> = Pick<T, KeyDiff<keyof T, keyof U>> & U;

@@ -1,13 +0,10 @@

export declare type Diff<T extends string, U extends string> = ({
[P in T]: P;
export declare type KeyDiff<T extends string, U extends string> = ({
[K in T]: K;
} & {
[P in U]: never;
[K in U]: never;
} & {
[x: string]: never;
[k: string]: never;
})[T];
export declare type Omit<T, K extends keyof T> = {
[P in Diff<keyof T, K>]: T[P];
};
export declare type Overwrite<T, U> = {
[P in Diff<keyof T, keyof U>]: T[P];
} & U;
export declare type Omit<T, K extends keyof T> = Pick<T, KeyDiff<keyof T, K>>;
export declare type Minus<T, U> = Pick<T, KeyDiff<keyof T, keyof U>>;
export declare type Overwrite<T, U> = Pick<T, KeyDiff<keyof T, keyof U>> & U;
{
"name": "react-redux-typescript",
"version": "3.0.0-beta1",
"version": "3.0.0-rc.0",
"description": "React / Redux / TypeScript Utils",

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

# React / Redux / TypeScript Utils
> Utility belt for React + Redux + TypeScript Projects
- Semantic Versioning
- No external dependencies
- Output separate bundles for your specific workflow needs:

@@ -34,2 +34,3 @@ - ES5 + CommonJS - `main`

### createAction
> https://github.com/piotrwitek/ts-redux-actions#createaction

@@ -49,22 +50,28 @@ ```ts

### KeyDiff<T extends string, U extends string>
```ts
type KeyDiffTest =
KeyDiff<'a' | 'b' | 'c', 'c' | 'd'>;
// Expect: 'a' | 'b'
```
### Diff
### Omit<T, K extends keyof T>
```ts
// TestDiff expects: ('a' | 'b')
type TestDiff =
Diff<'a' | 'b' | 'c', 'c' | 'd'>;
type OmitTest =
Omit<{ a: string, b?: number, c: boolean }, 'a'>;
// Expect: { b?: number | undefined, c: boolean }
```
### Omit
### Minus<T, U>
```ts
// TestOmit expects: { b: number, c: boolean }
type TestOmit =
Omit<{ a: string, b: number, c: boolean }, 'a'>;
type MinusTest =
Minus<{ a: string, b?: number, c: boolean }, { a: any }>;
// Expect { b?: number | undefined, c: boolean }
```
### Overwrite
### Overwrite<T, U>
```ts
// TestOverwrite expects: { b: number, c: boolean } & { a: number }
type TestOverwrite =
Overwrite<{ a: string, b: number, c: boolean }, { a: number }>;
type OverwriteTest =
Overwrite<{ a: string, b?: number, c: boolean }, { a: number }>;
// Expect: { b?: number | undefined, c: boolean } & { a: number }
```

@@ -71,0 +78,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc