fix: update return type for check is primitive (#15770)

This commit is contained in:
Mikhail
2025-08-27 12:38:14 +09:00
committed by GitHub
parent 3930a74122
commit 2afce0dc96
+4 -1
View File
@@ -58,4 +58,7 @@ export function getType(value: unknown): ValueType {
throw new Error(`value of unknown type: ${value}`);
}
export const isPrimitive = (value: unknown): boolean => Object(value) !== value;
export const isPrimitive = (
value: unknown,
): value is null | undefined | string | number | boolean | symbol | bigint =>
Object(value) !== value;