Last active
August 24, 2017 07:43
-
-
Save linktohack/f7e0f45f27cdb3e6c43ad618375ad1e5 to your computer and use it in GitHub Desktop.
Updeep type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'updeep' { | |
interface Placeholder { | |
} | |
interface Updeep { | |
<U extends {}>(updates: U): <T extends {}>(object: T) => T; //u(updates)(object) | |
<T extends {}>(_: Placeholder, object: T): <U extends {}>(updates: U) => T; // u(u._, object)(updates) | |
<T extends {}, U extends {}>(updates: U, object: T): T; // u(updates, object) | |
update<U extends {}>(updates: U): <T extends {}>(object: T) => T; // u.update(updates)(object) | |
update<T extends {}>(_: Placeholder, object: T): <U extends {}>(updates: U) => T; // u.update(u._, object)(updates) | |
update<T extends {}, U extends {}>(updates: U, object: T): T; // u.update(updates, object) | |
updateIn<T extends {}>(path: string | Array<string | number>, value: any, object: T): T; // u.updateIn(path, value, object) | |
constant<T extends {}>(object: T): T; // u.constant(object) | |
map(iteratee: (item: any) => any): <T extends {}>(object: T) => T // u.map(iteratee)(object) | |
map<T extends {}>(iteratee: (item: any) => any, object: T): T // u.map(iteratee, object) | |
_: Placeholder | |
} | |
const updeep: Updeep; | |
export = updeep; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment