Skip to content

Commit

Permalink
Address feddback
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanabrooks committed Jan 25, 2023
1 parent 4f8ec9c commit 5753ff3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/ui/src/helpers/typeGuards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
* Checks if `value` is an Object (excludes arrays and functions)
*
* @param value
* @returns
*/
export const isObject = (value: unknown): value is object =>
value != null && !Array.isArray(value) && typeof value === 'object';

/**
* Checks if `value` is a string
* Checks if `value` is a string (excludes primitive object wrappers)
*
* @param value
* @returns
*/
export const isString = (value: unknown): value is string =>
typeof value === 'string';
Expand All @@ -20,7 +18,6 @@ export const isString = (value: unknown): value is string =>
* Checks if `value` is undefined
*
* @param value
* @returns
*/
export const isUndefined = <T>(value: T | undefined): value is T =>
export const isUndefined = (value: unknown): value is undefined =>
value === undefined;

0 comments on commit 5753ff3

Please sign in to comment.