Skip to content

guards.Function.isStr

github-actions[bot] edited this page Jun 8, 2026 · 2 revisions

@zenstone/ts-utils / guards / isStr

Function: isStr()

isStr(val): val is string

Defined in: src/guards/index.ts:15

判定 val 是否为字符串类型(含 infer)

Parameters

val

unknown

Returns

val is string

See

https://stackoverflow.com/questions/4059147/check-if-a-variable-is-a-string-in-javascript

Clone this wiki locally