mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-07 16:30:12 +08:00
lodash: signatures of _.isString have been changed
This commit is contained in:
+28
-11
@@ -6111,17 +6111,34 @@ module TestIsRegExp {
|
||||
}
|
||||
|
||||
// _.isString
|
||||
result = <boolean>_.isString(any);
|
||||
result = <boolean>_(1).isString();
|
||||
result = <boolean>_<any>([]).isString();
|
||||
result = <boolean>_({}).isString();
|
||||
{
|
||||
let value: string|number = "foo";
|
||||
if (_.isString(value)) {
|
||||
let result: string = value;
|
||||
} else {
|
||||
let result: number = value * 42;
|
||||
}
|
||||
module TestIsString {
|
||||
{
|
||||
let value: number|string;
|
||||
|
||||
if (_.isString(value)) {
|
||||
let result: string = value;
|
||||
}
|
||||
else {
|
||||
let result: number = value;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.isString(any);
|
||||
result = _(1).isString();
|
||||
result = _<any>([]).isString();
|
||||
result = _({}).isString();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(1).chain().isString();
|
||||
result = _<any>([]).chain().isString();
|
||||
result = _({}).chain().isString();
|
||||
}
|
||||
}
|
||||
|
||||
// _.isTypedArray
|
||||
|
||||
Vendored
+9
-1
@@ -10165,9 +10165,10 @@ declare module _ {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as a String primitive or object.
|
||||
*
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
**/
|
||||
*/
|
||||
isString(value?: any): value is string;
|
||||
}
|
||||
|
||||
@@ -10178,6 +10179,13 @@ declare module _ {
|
||||
isString(): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* see _.isString
|
||||
*/
|
||||
isString(): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.isTypedArray
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user