0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 05:28:35 +00:00
renovatebot_renovate/lib/util/coerce.ts
2023-11-07 15:50:29 +00:00

10 lines
219 B
TypeScript

export function coerceToNull<T>(input: T | null | undefined): T | null {
return input ?? null;
}
export function coerceToUndefined<T>(
input: T | null | undefined,
): T | undefined {
return input ?? undefined;
}