dist/amd/strict/Interface.js
function addConstant(name, value, interf) {
        var target;

        // Check if it is public
        if (name.charAt(0) === '_') {
            throw new Error('Interface "' + interf.prototype.$name + '" contains an unallowed non public method: "' + name + '".');
        }
        // Check if it is a primitive value
        if (!isImmutable(value)) {
            throw new Error('Value for constant property "' + name + '" defined in interface "' + interf.prototype.$name + '" must be a primitive type.');
        }

        target = interf[$interface].constants;

        // Check if the constant already exists
        if (target[name]) {
            throw new Error('Cannot override constant property "' + name + '" in interface "' + interf.prototype.$name + '".');
        }

        target[name] = true;
        assignConstant(name, value, interf);
    }
function addConstant(name, value, interf) {
        var target;

        // Check if it is public
        if (name.charAt(0) === '_') {
            throw new Error('Interface "' + interf.prototype.$name + '" contains an unallowed non public method: "' + name + '".');
        }
        // Check if it is a primitive value
        if (!isImmutable(value)) {
            throw new Error('Value for constant property "' + name + '" defined in interface "' + interf.prototype.$name + '" must be a primitive type.');
        }

        target = interf[$interface].constants;

        // Check if the constant already exists
        if (target[name]) {
            throw new Error('Cannot override constant property "' + name + '" in interface "' + interf.prototype.$name + '".');
        }

        target[name] = true;
        assignConstant(name, value, interf);
    }
function addConstant ( name , value , interf ) { var target ; // Check if it is public if ( name . charAt ( 0 ) === '_' ) { throw new Error ( 'Interface "' + interf . prototype . $name + '" contains an unallowed non public method: "' + name + '".' ) ; } // Check if it is a primitive value if ( ! isImmutable ( value ) ) { throw new Error ( 'Value for constant property "' + name + '" defined in interface "' + interf . prototype . $name + '" must be a primitive type.' ) ; } target = interf [ $interface ] . constants ; // Check if the constant already exists if ( target [ name ] ) { throw new Error ( 'Cannot override constant property "' + name + '" in interface "' + interf . prototype . $name + '".' ) ; } target [ name ] = true ; assignConstant ( name , value , interf ) ; }
Adds a constant to an interface.
This method will throw an error if something is not right.

@param {String}   name        The constant name
@param {Function} value       The constant value
@param {Function} interf      The interface in which the constant will be saved
Adds a constant to an interface . This method will throw an error if something is not right .