-
Notifications
You must be signed in to change notification settings - Fork 0
guards.Function.isPresent
github-actions[bot] edited this page Jun 8, 2026
·
2 revisions
@zenstone/ts-utils / guards / isPresent
isPresent<
T>(val):val is T
Defined in: src/guards/index.ts:328
检查值是否不为 null 且不为 undefined
T
T | null | undefined
任意值
val is T
if (isPresent(value)) {
console.log(value);
}