You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/client/packages/design/components/utils.ts

8 lines
183 B
TypeScript

/**
* 是否一个可用的字符串
* 定义为有长度的字符串
*/
export function isValidStr(str: unknown): str is string {
return typeof str == 'string' && str !== '';
}