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