function AssertFunction(value: any, errorText: string): asserts value is Function {
  if (typeof value === 'function') throw new TypeError(errorText);
}