Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@types/seamless-immutable

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/seamless-immutable - npm Package Compare versions

Comparing version 6.1.2 to 7.1.0

seamless-immutable/LICENSE

106

seamless-immutable/index.d.ts

@@ -1,63 +0,83 @@

// Type definitions for Seamless-immutable 6.1.3
// Type definitions for Seamless-immutable 7.1
// Project: https://github.com/rtfeldman/seamless-immutable
// Definitions by: alex3165 <https://github.com/alex3165>
// Stepan Burguchev <https://github.com/xsburg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// This project is licensed under the MIT license.
// Copyrights are respective of each contributor listed at the beginning of each definition file.
export = SeamlessImmutable;
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
declare namespace SeamlessImmutable {
type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
interface MergeConfig {
deep?: boolean;
merger?(a: any, b: any, config: any): any;
}
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
interface Options {
prototype?: any;
}
export = SeamlessImmutable;
interface AsMutableOptions {
deep: boolean;
}
declare namespace SeamlessImmutable {
interface MergeConfig {
deep?: boolean;
merger?: Function;
}
interface ImmutableObjectMixin<T> {
set<K extends keyof T>(property: K, value: T[K]): ImmutableObject<T>;
set<TValue>(property: string, value: TValue): ImmutableObject<T>;
interface Options {
prototype?: any;
}
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, 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>;
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>;
interface AsMutableOptions {
deep: boolean;
}
asMutable(opts?: AsMutableOptions): T;
export interface ImmutableObject<T> {
set(property: string, value: any): ImmutableObject<any>;
setIn(propertyPath: Array<string>, value: any): ImmutableObject<any>;
merge(part: DeepPartial<T>, config?: MergeConfig): ImmutableObject<T>;
asMutable(): T;
asMutable(opts: AsMutableOptions): 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>;
merge(part: any, config?: MergeConfig): ImmutableObject<T>;
updateIn<K extends keyof T>(
propertyPath: [ K ], updaterFunction: (value: T[K], ...additionalParameters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<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>;
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>;
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>;
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>;
update(property: string, updaterFunction: (value: any, ...additionalParamters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<T>;
updateIn(propertyPath: Array<string>, updaterFunction: (value: any, ...additionalParamters: any[]) => any, ...additionalArguments: any[]): ImmutableObject<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(property: string): ImmutableObject<any>;
without(...properties: string[]): ImmutableObject<any>;
without(filter: (value: any, key: string) => boolean): ImmutableObject<any>;
}
interface ImmutableArrayMixin<T> {
asMutable(opts?: AsMutableOptions): T[];
asObject(toKeyValue: (item: T) => [string, any]): ImmutableObject<any>;
flatMap<TTarget>(mapFunction: (item: T) => TTarget[]): ImmutableArray<TTarget>;
}
export interface ImmutableArray<T> {
asMutable(): Array<T>;
asMutable(opts: AsMutableOptions): Array<T>;
asObject(toKeyValue: (item: T) => Array<any>): ImmutableObject<T>;
flatMap(mapFunction: (item: T) => Array<any>): ImmutableArray<any>;
}
type ImmutableObject<T> = T & ImmutableObjectMixin<T>;
type ImmutableArray<T> = T[] & ImmutableArrayMixin<T>;
type Immutable<T> = ImmutableObject<T> | ImmutableArray<T>;
// an immutable object is both of Type T (i.e., looks like a normal T) and of type Immutable<T>
export type Immutable<T> = T & (ImmutableObject<T> | ImmutableArray<T>);
function from<T>(obj: T[], options?: Options): ImmutableArray<T>;
function from<T>(obj: T, options?: Options): ImmutableObject<T>;
export function from<T>(obj: Array<T>, options?: Options): Array<T> & ImmutableArray<T>;
export function from<T>(obj: T, options?: Options): T & ImmutableObject<T>;
function isImmutable(target: any): boolean;
function ImmutableError(message: string): Error;
}
export function isImmutable(target: any): boolean;
export function ImmutableError(message: string): Error;
}
declare function SeamlessImmutable<T>(obj: T[], options?: SeamlessImmutable.Options): SeamlessImmutable.ImmutableArray<T>;
declare function SeamlessImmutable<T>(obj: T, options?: SeamlessImmutable.Options): SeamlessImmutable.ImmutableObject<T>;
{
"name": "@types/seamless-immutable",
"version": "6.1.2",
"description": "TypeScript definitions for Seamless-immutable 6.1.3",
"version": "7.1.0",
"description": "TypeScript definitions for Seamless-immutable",
"license": "MIT",
"author": "alex3165 <https://github.com/alex3165>",
"contributors": [
{
"name": "alex3165",
"url": "https://github.com/alex3165"
},
{
"name": "Stepan Burguchev",
"url": "https://github.com/xsburg"
}
],
"main": "",

@@ -15,4 +24,4 @@ "repository": {

"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "107304466a6d003667525a125a04e4b54f022788d05c6aae838c85ad57b73261"
"typesPublisherContentHash": "7686f0890cbb0c14fadad97009440004b0adbbca1191fe27ebb5b3ede8883d91",
"typeScriptVersion": "2.3"
}

@@ -5,15 +5,13 @@ # Installation

# Summary
This package contains type definitions for Seamless-immutable 6.1.3 (https://github.com/rtfeldman/seamless-immutable).
This package contains type definitions for Seamless-immutable (https://github.com/rtfeldman/seamless-immutable).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/seamless-immutable
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/seamless-immutable
Additional Details
* Last updated: Thu, 03 Nov 2016 17:41:49 GMT
* File structure: ProperModule
* Library Dependencies: none
* Module Dependencies: none
* Global values: SeamlessImmutable
* Last updated: Mon, 10 Jul 2017 19:46:47 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by alex3165 <https://github.com/alex3165>.
These definitions were written by alex3165 <https://github.com/alex3165>, Stepan Burguchev <https://github.com/xsburg>.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc