Merge pull request #6404 from chrootsu/lodash-endsWith

lodash: signatures of the method _.endsWith changed
This commit is contained in:
Masahiro Wakame
2015-10-27 00:33:14 +09:00
2 changed files with 38 additions and 6 deletions
+18 -4
View File
@@ -3742,10 +3742,24 @@ result = <string>_.deburr('déjà vu');
result = <string>_('déjà vu').deburr();
// _.endsWith
result = <boolean>_.endsWith('abc', 'c');
result = <boolean>_.endsWith('abc', 'c', 1);
result = <boolean>_('abc').endsWith('c');
result = <boolean>_('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<boolean>;
result = _('abc').chain().endsWith('c');
result = _('abc').chain().endsWith('c', 1);
}
}
// _.escape
result = <string>_.escape('fred, barney, & pebbles');
+20 -2
View File
@@ -9067,19 +9067,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<T> {
/**
* @see _.endsWith
*/
endsWith(target?: string, position?: number): boolean;
endsWith(
target?: string,
position?: number
): boolean;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.endsWith
*/
endsWith(
target?: string,
position?: number
): LoDashExplicitWrapper<boolean>;
}
// _.escape