mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
lodash: signatures of the method _.startsWith have been changed
This commit is contained in:
+18
-5
@@ -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;
|
||||
|
||||
Vendored
+20
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user