import * as check from "../../../sync/check/null-or-undefined"; import {AssertError} from "../../../sync/error/AssertError"; export function assertNullOrUndefined (name : string, mixed : any) : (null|undefined)|never { const error = check.checkNullOrUndefined(mixed); if (error === undefined) { return mixed; } else { throw new AssertError(name, error, mixed); } }