diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index c083edd4c..5a14f2308 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3545,10 +3545,24 @@ result = _.deburr('déjà vu'); result = _('déjà vu').deburr(); // _.endsWith -result = _.endsWith('abc', 'c'); -result = _.endsWith('abc', 'c', 1); -result = _('abc').endsWith('c'); -result = _('abc').endsWith('c', 1); +module TestEndsWith { + { + let result: boolean; + + result = _.endsWith('abc', 'c'); + result = _.endsWith('abc', 'c', 1); + + result = _('abc').endsWith('c'); + result = _('abc').endsWith('c', 1); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('abc').chain().endsWith('c'); + result = _('abc').chain().endsWith('c', 1); + } +} // _.escape result = _.escape('fred, barney, & pebbles'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 881124328..e7075f71c 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9011,19 +9011,37 @@ declare module _ { interface LoDashStatic { /** * Checks if string ends with the given target string. + * * @param string The string to search. * @param target The string to search for. * @param position The position to search from. * @return Returns true if string ends with target, else false. */ - endsWith(string?: string, target?: string, position?: number): boolean; + endsWith( + string?: string, + target?: string, + position?: number + ): boolean; } interface LoDashImplicitWrapper { /** * @see _.endsWith */ - endsWith(target?: string, position?: number): boolean; + endsWith( + target?: string, + position?: number + ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; } // _.escape