@types/seamless-immutable
Advanced tools
Comparing version 7.1.2 to 7.1.3
@@ -6,4 +6,5 @@ // Type definitions for Seamless-immutable 7.1 | ||
// Geir Sagberg <https://github.com/geirsagberg> | ||
// Richard Honor <https://github.com/RMHonor> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.4 | ||
// TypeScript Version: 2.8 | ||
@@ -35,13 +36,13 @@ export = SeamlessImmutable; | ||
interface ImmutableObjectMixin<T> { | ||
set<K extends keyof T>(property: K, value: T[K]): ImmutableObject<T>; | ||
set<TValue>(property: string, value: TValue): ImmutableObject<T>; | ||
set<K extends keyof T>(property: K, value: T[K]): Immutable<T>; | ||
set<TValue>(property: string, value: TValue): Immutable<T>; | ||
setIn<K extends keyof T>(propertyPath: [ K ], value: T[K]): ImmutableObject<T>; | ||
setIn<K extends keyof T, L extends keyof T[K]>(propertyPath: [ K, L ], value: T[K][L]): ImmutableObject<T>; | ||
setIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L]>(propertyPath: [ K, L, M ], value: T[K][L][M]): ImmutableObject<T>; | ||
setIn<K extends keyof T>(propertyPath: [ K ], value: T[K]): Immutable<T>; | ||
setIn<K extends keyof T, L extends keyof T[K]>(propertyPath: [ K, L ], value: T[K][L]): Immutable<T>; | ||
setIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L]>(propertyPath: [ K, L, M ], value: T[K][L][M]): Immutable<T>; | ||
setIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L], N extends keyof T[K][L][M]>( | ||
propertyPath: [ K, L, M, N ], value: T[K][L][M][N]): ImmutableObject<T>; | ||
propertyPath: [ K, L, M, N ], value: T[K][L][M][N]): Immutable<T>; | ||
setIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L], N extends keyof T[K][L][M], O extends keyof T[K][L][M][N]>( | ||
propertyPath: [ K, L, M, N, O ], value: T[K][L][M][N][O]): ImmutableObject<T>; | ||
setIn<TValue>(propertyPath: string[], value: TValue): ImmutableObject<T>; | ||
propertyPath: [ K, L, M, N, O ], value: T[K][L][M][N][O]): Immutable<T>; | ||
setIn<TValue>(propertyPath: string[], value: TValue): Immutable<T>; | ||
@@ -64,46 +65,46 @@ getIn<K extends keyof T>(propertyPath: [ K ]): Immutable<T[K]>; | ||
merge(part: DeepPartial<T>, config?: MergeConfig): ImmutableObject<T>; | ||
merge(part: DeepPartial<T>, config?: MergeConfig): Immutable<T>; | ||
update<K extends keyof T>(property: K, updaterFunction: (value: T[K], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
update<TValue>(property: string, updaterFunction: (value: TValue, ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
update<K extends keyof T>(property: K, updaterFunction: (value: T[K], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
update<TValue>(property: string, updaterFunction: (value: TValue, ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<K extends keyof T>( | ||
propertyPath: [ K ], updaterFunction: (value: T[K], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
propertyPath: [ K ], updaterFunction: (value: T[K], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<K extends keyof T, L extends keyof T[K]>( | ||
propertyPath: [ K, L ], updaterFunction: (value: T[K][L], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
propertyPath: [ K, L ], updaterFunction: (value: T[K][L], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L]>( | ||
propertyPath: [ K, L, M ], updaterFunction: (value: T[K][L][M], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
propertyPath: [ K, L, M ], updaterFunction: (value: T[K][L][M], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L], N extends keyof T[K][L][M]>( | ||
propertyPath: [ K, L, M, N ], updaterFunction: (value: T[K][L][M][N], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
propertyPath: [ K, L, M, N ], updaterFunction: (value: T[K][L][M][N], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<K extends keyof T, L extends keyof T[K], M extends keyof T[K][L], N extends keyof T[K][L][M], O extends keyof T[K][L][M][N]>( | ||
propertyPath: [ K, L, M, N, O ], updaterFunction: (value: T[K][L][M][N][O], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
updateIn<TValue>(propertyPath: string[], updaterFunction: (value: TValue, ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>; | ||
propertyPath: [ K, L, M, N, O ], updaterFunction: (value: T[K][L][M][N][O], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
updateIn<TValue>(propertyPath: string[], updaterFunction: (value: TValue, ...additionalParameters: any[]) => any, ...additionalArguments: any[]): Immutable<T>; | ||
without<K extends keyof T>(property: K): ImmutableObject<T>; | ||
without<K extends keyof T>(...properties: K[]): ImmutableObject<T>; | ||
without<K extends keyof T>(filter: (value: T[K], key: K) => boolean): ImmutableObject<T>; | ||
without<K extends keyof T>(property: K): Immutable<T>; | ||
without<K extends keyof T>(...properties: K[]): Immutable<T>; | ||
without<K extends keyof T>(filter: (value: T[K], key: K) => boolean): Immutable<T>; | ||
replace<S>(valueObj: S, options?: ReplaceConfig): ImmutableObject<S>; | ||
replace<S>(valueObj: S, options?: ReplaceConfig): Immutable<S>; | ||
} | ||
interface ImmutableArrayMixin<T> { | ||
asMutable(opts?: AsMutableOptions): T[]; | ||
asObject(toKeyValue: (item: T) => [string, any]): ImmutableObject<any>; | ||
flatMap<TTarget>(mapFunction: (item: T) => TTarget[]): ImmutableArray<TTarget>; | ||
interface ImmutableArrayMixin<T extends Array<T[0]>> { | ||
asMutable(opts?: AsMutableOptions): T; | ||
asObject(toKeyValue: (item: T[0]) => [string, any]): Immutable<object>; | ||
flatMap<TTarget>(mapFunction: (item: T[0]) => TTarget): Immutable<TTarget extends any[] ? TTarget : TTarget[]>; | ||
} | ||
type ImmutableObject<T> = T & ImmutableObjectMixin<T>; | ||
type ImmutableArray<T> = T[] & ImmutableArrayMixin<T>; | ||
type Immutable<T> = ImmutableObject<T> | ImmutableArray<T>; | ||
type BaseImmutable<T> = (T extends any[] ? ImmutableArrayMixin<T> : ImmutableObjectMixin<T>) & T; | ||
function from<T>(obj: T[], options?: Options): ImmutableArray<T>; | ||
function from<T>(obj: T, options?: Options): ImmutableObject<T>; | ||
type Immutable<T> = { | ||
readonly [P in keyof T]: T[P] extends object ? Immutable<T[P]> : T[P] | ||
} & BaseImmutable<T>; | ||
function from<T>(obj: T, options?: Options): Immutable<T>; | ||
function isImmutable(target: any): boolean; | ||
function ImmutableError(message: string): Error; | ||
function replace<T, S>(obj: ImmutableObject<T>, valueObj: S, options?: ReplaceConfig): ImmutableObject<S>; | ||
function replace<T, S>(obj: Immutable<T>, valueObj: S, options?: ReplaceConfig): Immutable<S>; | ||
} | ||
declare function SeamlessImmutable<T>(obj: T[], options?: SeamlessImmutable.Options): SeamlessImmutable.ImmutableArray<T>; | ||
declare function SeamlessImmutable<T>(obj: T, options?: SeamlessImmutable.Options): SeamlessImmutable.ImmutableObject<T>; | ||
declare function SeamlessImmutable<T>(obj: T, options?: SeamlessImmutable.Options): SeamlessImmutable.Immutable<T>; |
{ | ||
"name": "@types/seamless-immutable", | ||
"version": "7.1.2", | ||
"version": "7.1.3", | ||
"description": "TypeScript definitions for Seamless-immutable", | ||
@@ -21,5 +21,11 @@ "license": "MIT", | ||
"githubUsername": "geirsagberg" | ||
}, | ||
{ | ||
"name": "Richard Honor", | ||
"url": "https://github.com/RMHonor", | ||
"githubUsername": "RMHonor" | ||
} | ||
], | ||
"main": "", | ||
"types": "", | ||
"repository": { | ||
@@ -31,4 +37,4 @@ "type": "git", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "071b1ed830c4586221920d7b2057d2c514e4b387fb48009ab23df7563cab7bc9", | ||
"typeScriptVersion": "2.4" | ||
"typesPublisherContentHash": "21ec804d9b6a112bf8e7f8ff41fb2675c698c18c9f4679acdd4fd1388fba14f7", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Thu, 21 Jun 2018 00:15:28 GMT | ||
* Last updated: Mon, 15 Oct 2018 17:21:48 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by alex3165 <https://github.com/alex3165>, Stepan Burguchev <https://github.com/xsburg>, Geir Sagberg <https://github.com/geirsagberg>. | ||
These definitions were written by alex3165 <https://github.com/alex3165>, Stepan Burguchev <https://github.com/xsburg>, Geir Sagberg <https://github.com/geirsagberg>, Richard Honor <https://github.com/RMHonor>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9425