// as vscode/monaco-editor is behind 1.33.1 /** * Converts null to undefined, passes all other values through. */ export function withNullAsUndefined(x: T | null): T | undefined { return x === null ? undefined : x; } /** * Converts undefined to null, passes all other values through. */ export function withUndefinedAsNull(x: T | undefined): T | null { return typeof x === 'undefined' ? null : x; }