Files
twenty/front/src/utils/isDefined.ts
Charles Bochet 6ced8434bd Uniformize folder structure (#693)
* Uniformize folder structure

* Fix icons

* Fix icons

* Fix tests

* Fix tests
2023-07-16 14:29:28 -07:00

6 lines
140 B
TypeScript

export function isDefined<T>(
value: T | undefined | null,
): value is NonNullable<T> {
return value !== undefined && value !== null;
}