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