@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
18 lines (17 loc) • 418 B
TypeScript
/**
* @description - Typescript validator to assert if a value is `string` type.
*
* @example
*
* let foo: number | string = 0
*
* if(Math.random() < 0.5){
* foo = 'bar'
* }
*
* if(isStringTypeOf(foo)) {
* // We asserted the value is actually an string!
* console.log("foo length is: " + foo.length) // foo length is 3
* }
*/
export declare const isStringTypeOf: (value: unknown) => value is string;