added _.runInContext definition

This commit is contained in:
Brian Zengel
2013-10-20 18:44:51 -04:00
parent 5038619a71
commit ad30e9d356
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -742,6 +742,9 @@ var object = {
result = <any>_.result(object, 'cheese');
result = <any>_.result(object, 'stuff');
var tempObject = {};
result = <typeof _>_.runInContext(tempObject);
//////////////////////////////////////////////////////////////////////////////////////////////////
var iceCream = { flavor: "chocolate" };
+6
View File
@@ -2772,6 +2772,12 @@ declare module _ {
**/
export function result(object: any, property: string): any;
/**
* Create a new lodash function using the given context object.
* @param context The context object
* @returns The lodash function.
**/
export function runInContext(context: any): typeof _;