fixed _(...).after defs, added _(...).assign/_(...).extend defs

This commit is contained in:
Brian Zengel
2013-10-20 23:21:29 -04:00
parent 25debf0a84
commit 716b7f981c
2 changed files with 293 additions and 95 deletions
+12 -2
View File
@@ -423,9 +423,9 @@ _.forEach(saves, function(type) {
asyncSave({ 'type': type, 'complete': done });
});
done = _(function() {
done = _(saves.length).after(function() {
console.log('Done saving!');
}).after(saves.length);
}).value();
_.forEach(saves, function(type) {
asyncSave({ 'type': type, 'complete': done });
@@ -560,11 +560,21 @@ result = <any>_.assign({ 'name': 'moe' }, { 'age': 40 }, function(a, b) {
return typeof a == 'undefined' ? b : a;
});
result = <_.LoDashWrapper<any>>_({ 'name': 'moe' }).assign({ 'age': 40 });
result = <_.LoDashWrapper<any>>_({ 'name': 'moe' }).assign({ 'age': 40 }, function(a, b) {
return typeof a == 'undefined' ? b : a;
});
result = <any>_.extend({ 'name': 'moe' }, { 'age': 40 });
result = <any>_.extend({ 'name': 'moe' }, { 'age': 40 }, function(a, b) {
return typeof a == 'undefined' ? b : a;
});
result = <_.LoDashWrapper<any>>_({ 'name': 'moe' }).extend({ 'age': 40 });
result = <_.LoDashWrapper<any>>_({ 'name': 'moe' }).extend({ 'age': 40 }, function(a, b) {
return typeof a == 'undefined' ? b : a;
});
var result = <any>_.clone(stoogesAges);
var result = <any>_.clone(stoogesAges, true);
var result = <any>_.clone(stoogesAges, true, function(value) {
+281 -93
View File
@@ -1884,7 +1884,7 @@ declare module _ {
/**
* @see _.after
**/
after(n: number): Function;
after(func: Function): LoDashWrapper<Function>;
}
/**
@@ -2219,105 +2219,293 @@ declare module _ {
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
interface LoDashWrapper<T> {
/**
* @see _.assign
**/
assign(
s1: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
s4: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
s8: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
assign(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
s8: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
}
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.extend
**/
export function extend(
object: any,
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
s8: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
interface LoDashWrapper<T> {
/**
* @see _.assign
**/
extend(
s1: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
s4: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
/**
* @see _.assign
**/
extend(
s1: any,
s2: any,
s3: any,
s4: any,
s5: any,
s6: any,
s7: any,
s8: any,
callback?: (objectValue: any, sourceValue: any) => any,
thisArg?: any): any;
}
/**
* Creates a clone of value. If deep is true nested objects will also be cloned, otherwise