function addHook(target, hookType, methodName, options) {
    if (options === void 0) { options = {}; }
    if (typeof target !== 'function') {
        throw new Error("Hook method '" + methodName + "' is not a static method. " +
            "Only static methods can be used for hooks");
    }
    // make sure the hook name doesn’t conflict with Sequelize’s existing methods
    if (methodName === hookType) {
        throw new Error("Hook method cannot be named '" + methodName + "'. That name is " +
            "reserved by Sequelize");
    }
    var hooks = getHooks(target) || [];
    hooks.push({
        hookType: hookType,
        methodName: methodName,
        options: options
    });
    setHooks(target, hooks);
}
/**
 * Adds hook meta data for specified model
 * @throws if applied to a non-static method
 * @throws if the hook method name is reserved
 */
Adds hook meta data for specified model
@throws if applied to a non-static method
@throws if the hook method name is reserved
Adds hook meta data for specified model @throws if applied to a non - static method @throws if the hook method name is reserved
function addHook(target, hookType, methodName, options) {
    if (options === void 0) { options = {}; }
    if (typeof target !== 'function') {
        throw new Error("Hook method '" + methodName + "' is not a static method. " +
            "Only static methods can be used for hooks");
    }
    if (methodName === hookType) {
        throw new Error("Hook method cannot be named '" + methodName + "'. That name is " +
            "reserved by Sequelize");
    }
    var hooks = getHooks(target) || [];
    hooks.push({
        hookType: hookType,
        methodName: methodName,
        options: options
    });
    setHooks(target, hooks);
}
function addHook ( target , hookType , methodName , options ) { if ( options === void 0 ) { options = { } ; } if ( typeof target !== 'function' ) { throw new Error ( "Hook method '" + methodName + "' is not a static method. " + "Only static methods can be used for hooks" ) ; } if ( methodName === hookType ) { throw new Error ( "Hook method cannot be named '" + methodName + "'. That name is " + "reserved by Sequelize" ) ; } var hooks = getHooks ( target ) || [ ] ; hooks . push ( { hookType : hookType , methodName : methodName , options : options } ) ; setHooks ( target , hooks ) ; }
Adds hook meta data for specified model
 @throws if applied to a non-static method
 @throws if the hook method name is reserved
Adds hook meta data for specified model @throws if applied to a non - static method @throws if the hook method name is reserved
// make sure the hook name doesn’t conflict with Sequelize’s existing methods