wol 03f2c49b7e
Some checks failed
Remove old artifacts / remove-old-artifacts (push) Has been cancelled
init
2025-08-04 00:20:29 +08:00

7 lines
335 B
TypeScript

type Truthy<T> = T extends null | undefined | 0 | "" | false ? false : true;
type Falsy<T> = T extends null | undefined | 0 | "" | false ? true : false;
declare function isTruthy<T>(value: T): value is T & Truthy<T>;
declare function isFalsy<T>(value: T): value is T & Falsy<T>;
export { type Falsy, type Truthy, isFalsy, isTruthy };