9 lines
240 B
TypeScript
9 lines
240 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
export function isNotNil<T>(value: T | null | undefined): value is T {
|
|
if (value === null || value === undefined) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|