You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Property 'substr' does not exist on type 'string | number'.
Property 'substr' does not exist on type 'number'.
Value Proposition:
This is a common thing to do with external libraries (e.g., Lodash):
//_.isStringinterfaceLoDashStatic{/** * 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;}
Related to #2388
TypeScript Version: 2.1.5 (Playground)
Code
Expected behavior:
No errors.
Actual behavior:
Value Proposition:
This is a common thing to do with external libraries (e.g., Lodash):
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/lodash/index.d.ts#L12586-L12595
https://lodash.com/docs/4.17.4#isString
The text was updated successfully, but these errors were encountered: