From 2b081e4eb4db1da2013409d9f6f3945148ee7314 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Mon, 17 Feb 2025 18:19:01 +0800 Subject: [PATCH] =?UTF-8?q?types:=20=E4=BC=98=E5=8C=96=E8=B0=83=E7=94=A8?= =?UTF-8?q?=20isString=20=E6=96=B9=E6=B3=95=E5=90=8E=E5=AF=B9=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=8E=A8=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/utils/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/utils/validate.ts b/src/common/utils/validate.ts index 1308e269..47c7f5f6 100644 --- a/src/common/utils/validate.ts +++ b/src/common/utils/validate.ts @@ -4,7 +4,7 @@ export function isArray(arg: T) { } /** 判断是否为字符串 */ -export function isString(str: T) { +export function isString(str: unknown) { return typeof str === "string" || str instanceof String }