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