From 8ccedd8242b9ae4516b2e88c28c742f6ad87a1c1 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Mon, 10 Aug 2015 22:09:17 +0500 Subject: [PATCH] lodash: added _.propertyOf() method --- lodash/lodash-tests.ts | 11 +++++++++++ lodash/lodash.d.ts | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index d36b5dfc4..9ffe25897 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1439,6 +1439,17 @@ result = _.result(object, 'stuff'); var tempObject = {}; result = _.runInContext(tempObject); +// _.propertyOf +interface TestPropertyOfObject { + a: { + b: number[]; + } +} +var testPropertyOfObject: TestPropertyOfObject; +result = <(path: string|string[]) => any>_.propertyOf({}); +result = <(path: string|string[]) => any>_.propertyOf(testPropertyOfObject); +result = <(path: string|string[]) => any>_({}).propertyOf().value(); + result = <_.TemplateExecutor>_.template('hello <%= name %>'); result = _.template('<%- value %>', { 'value': '