mirror of
https://github.com/hanzoai/jest.git
synced 2026-09-24 16:59:57 +00:00
fix: update return type for check is primitive (#15770)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user