mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
added _.partialRight definition
This commit is contained in:
1 parent
557389c808
commit
a7b164dda6
2 files changed
+23
-2
No files matched your search
@@ -492,6 +492,16 @@ var greetPartial = function(greeting, name) { return greeting + ' ' + name; };
|
||||
var hi = <Function>_.partial(greetPartial, 'hi');
|
||||
hi('moe');
|
||||
|
||||
var defaultsDeep = <Function>_.partialRight(_['merge'], _.defaults);
|
||||
|
||||
var optionsPartialRight = {
|
||||
'variable': 'data',
|
||||
'imports': { 'jq': $ }
|
||||
};
|
||||
|
||||
defaultsDeep(optionsPartialRight, _.templateSettings);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
//WHAT'S LEFT
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vendored
+13
-2
@@ -1877,8 +1877,19 @@ declare module _ {
|
||||
* @return The new partially applied function.
|
||||
**/
|
||||
export function partial(
|
||||
fn: Function,
|
||||
...arguments: any[]): Function;
|
||||
func: Function,
|
||||
...args: any[]): Function;
|
||||
|
||||
/**
|
||||
* This method is like _.partial except that partial arguments are appended to those provided
|
||||
* to the new function.
|
||||
* @param func The function to partially apply arguments to.
|
||||
* @param args Arguments to be partially applied.
|
||||
* @return The new partially applied function.
|
||||
**/
|
||||
export function partialRight(
|
||||
func: Function,
|
||||
...args: any[]): Function;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user