Merge pull request #6565 from chrootsu/lodash-padLeft

lodash: signatures of the method _.padLeft have been changed
This commit is contained in:
Masahiro Wakame
2015-11-02 23:40:57 +09:00
2 changed files with 41 additions and 9 deletions
+21 -6
View File
@@ -4377,12 +4377,27 @@ module TestPad {
}
// _.padLeft
result = <string>_.padLeft('abc');
result = <string>_.padLeft('abc', 6);
result = <string>_.padLeft('abc', 6, '_-');
result = <string>_('abc').padLeft();
result = <string>_('abc').padLeft(6);
result = <string>_('abc').padLeft(6, '_-');
module TestPadLeft {
{
let result: string;
result = _.padLeft('abc');
result = _.padLeft('abc', 6);
result = _.padLeft('abc', 6, '_-');
result = _('abc').padLeft();
result = _('abc').padLeft(6);
result = _('abc').padLeft(6, '_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('abc').chain().padLeft();
result = _('abc').chain().padLeft(6);
result = _('abc').chain().padLeft(6, '_-');
}
}
// _.padRight
module TestPadRight {
+20 -3
View File
@@ -9826,20 +9826,37 @@ declare module _ {
/**
* Pads string on the left side if its shorter than length. Padding characters are truncated if they exceed
* length.
*
* @param string The string to pad.
* @param length The padding length.
* @param chars The string used as padding.
* @return Returns the padded string.
*/
padLeft(string?: string, length?: number, chars?: string): string;
padLeft(
string?: string,
length?: number,
chars?: string
): string;
}
//_.padLeft
interface LoDashImplicitWrapper<T> {
/**
* @see _.padLeft
*/
padLeft(length?: number, chars?: string): string;
padLeft(
length?: number,
chars?: string
): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.padLeft
*/
padLeft(
length?: number,
chars?: string
): LoDashExplicitWrapper<string>;
}
//_.padRight