lodash: signatures of the method _.startsWith have been changed

This commit is contained in:
Ilya Mochalov
2015-11-03 05:40:44 +05:00
parent 0dd29bf825
commit 72f1dfa7b2
2 changed files with 38 additions and 7 deletions
+18 -5
View File
@@ -4614,13 +4614,26 @@ module TestStartCase {
}
// _.startsWith
result = <boolean>_.startsWith('abc', 'a');
result = <boolean>_.startsWith('abc', 'a', 1);
result = <boolean>_('abc').startsWith('a');
result = <boolean>_('abc').startsWith('a', 1);
module TestStartsWith {
{
let result: boolean;
result = _.startsWith('abc', 'a');
result = _.startsWith('abc', 'a', 1);
result = _('abc').startsWith('a');
result = _('abc').startsWith('a', 1);
}
{
let result: _.LoDashExplicitWrapper<boolean>;
result = _('abc').chain().startsWith('a');
result = _('abc').chain().startsWith('a', 1);
}
}
// _.template
module TestTemplate {
interface TemplateExecutor {
(obj?: Object): string;
+20 -2
View File
@@ -10146,19 +10146,37 @@ declare module _ {
interface LoDashStatic {
/**
* Checks if string starts 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 starts with target, else false.
*/
startsWith(string?: string, target?: string, position?: number): boolean;
startsWith(
string?: string,
target?: string,
position?: number
): boolean;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.startsWith
*/
startsWith(target?: string, position?: number): boolean;
startsWith(
target?: string,
position?: number
): boolean;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.startsWith
*/
startsWith(
target?: string,
position?: number
): LoDashExplicitWrapper<boolean>;
}
//_.template