mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
lodash: changed _.startsWith() method
This commit is contained in:
@@ -1683,7 +1683,12 @@ result = <string>_.snakeCase('Foo Bar');
|
||||
result = <string>_('Foo Bar').snakeCase();
|
||||
|
||||
result = <string>_.startCase('--foo-bar');
|
||||
|
||||
// _.startsWith
|
||||
result = <boolean>_.startsWith('abc', 'a');
|
||||
result = <boolean>_.startsWith('abc', 'a', 1);
|
||||
result = <boolean>_('abc').startsWith('a');
|
||||
result = <boolean>_('abc').startsWith('a', 1);
|
||||
|
||||
// _.trim
|
||||
result = <string>_.trim();
|
||||
|
||||
Vendored
+19
-1
@@ -7530,7 +7530,25 @@ declare module _ {
|
||||
|
||||
interface LoDashStatic {
|
||||
startCase(str?: string): string;
|
||||
startsWith(str?: string, target?: string, position?: number): boolean;
|
||||
}
|
||||
|
||||
//_.startsWith
|
||||
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;
|
||||
}
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.startsWith
|
||||
*/
|
||||
startsWith(target?: string, position?: number): boolean;
|
||||
}
|
||||
|
||||
//_.trim
|
||||
|
||||
Reference in New Issue
Block a user