renovate/lib/util/coerce.ts

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;
}