dist/amd/strict/Interface.js
function checkClass(target) {
        /*jshint validthis:true*/
        var key,
            value;

        // Check normal functions
        for (key in this[$interface].methods) {
            value = this[$interface].methods[key];

            if (!target[$class].methods[key]) {
                throw new Error('Class "' + target.prototype.$name + '" does not implement interface "' + this.prototype.$name + '" correctly, method "' + key + '" was not found.');
            }
            if (!isFunctionCompatible(target[$class].methods[key], value)) {
                throw new Error('Method "' + key + '(' + target[$class].methods[key].signature + ')" defined in class "' + target.prototype.$name + '" is not compatible with the one found in interface "' + this.prototype.$name + '": "' + key + '(' + value.signature + ')".');
            }
        }

        // Check static functions
        for (key in this[$interface].staticMethods) {

            value = this[$interface].staticMethods[key];

            if (!target[$class].staticMethods[key]) {
                throw new Error('Class "' + target.prototype.$name + '" does not implement interface "' + this.prototype.$name + '" correctly, static method "' + key + '" was not found.');
            }
            if (!isFunctionCompatible(target[$class].staticMethods[key], value)) {
                throw new Error('Static method "' + key + '(' + target[$class].staticMethods[key].signature + ')" defined in class "' + target.prototype.$name + '" is not compatible with the one found in interface "' + this.prototype.$name + '": "' + key + '(' + value.signature + ')".');
            }
        }
    }
function checkClass(target) {
        /*jshint validthis:true*/
        var key,
            value;

        // Check normal functions
        for (key in this[$interface].methods) {
            value = this[$interface].methods[key];

            if (!target[$class].methods[key]) {
                throw new Error('Class "' + target.prototype.$name + '" does not implement interface "' + this.prototype.$name + '" correctly, method "' + key + '" was not found.');
            }
            if (!isFunctionCompatible(target[$class].methods[key], value)) {
                throw new Error('Method "' + key + '(' + target[$class].methods[key].signature + ')" defined in class "' + target.prototype.$name + '" is not compatible with the one found in interface "' + this.prototype.$name + '": "' + key + '(' + value.signature + ')".');
            }
        }

        // Check static functions
        for (key in this[$interface].staticMethods) {

            value = this[$interface].staticMethods[key];

            if (!target[$class].staticMethods[key]) {
                throw new Error('Class "' + target.prototype.$name + '" does not implement interface "' + this.prototype.$name + '" correctly, static method "' + key + '" was not found.');
            }
            if (!isFunctionCompatible(target[$class].staticMethods[key], value)) {
                throw new Error('Static method "' + key + '(' + target[$class].staticMethods[key].signature + ')" defined in class "' + target.prototype.$name + '" is not compatible with the one found in interface "' + this.prototype.$name + '": "' + key + '(' + value.signature + ')".');
            }
        }
    }
function checkClass ( target ) { /*jshint validthis:true*/ var key , value ; // Check normal functions for ( key in this [ $interface ] . methods ) { value = this [ $interface ] . methods [ key ] ; if ( ! target [ $class ] . methods [ key ] ) { throw new Error ( 'Class "' + target . prototype . $name + '" does not implement interface "' + this . prototype . $name + '" correctly, method "' + key + '" was not found.' ) ; } if ( ! isFunctionCompatible ( target [ $class ] . methods [ key ] , value ) ) { throw new Error ( 'Method "' + key + '(' + target [ $class ] . methods [ key ] . signature + ')" defined in class "' + target . prototype . $name + '" is not compatible with the one found in interface "' + this . prototype . $name + '": "' + key + '(' + value . signature + ')".' ) ; } } // Check static functions for ( key in this [ $interface ] . staticMethods ) { value = this [ $interface ] . staticMethods [ key ] ; if ( ! target [ $class ] . staticMethods [ key ] ) { throw new Error ( 'Class "' + target . prototype . $name + '" does not implement interface "' + this . prototype . $name + '" correctly, static method "' + key + '" was not found.' ) ; } if ( ! isFunctionCompatible ( target [ $class ] . staticMethods [ key ] , value ) ) { throw new Error ( 'Static method "' + key + '(' + target [ $class ] . staticMethods [ key ] . signature + ')" defined in class "' + target . prototype . $name + '" is not compatible with the one found in interface "' + this . prototype . $name + '": "' + key + '(' + value . signature + ')".' ) ; } } }
Checks if an interface is well implemented in a class.
In order to this function to work, it must be bound to an interface definition.

@param {Function} target The class to be checked
Checks if an interface is well implemented in a class . In order to this function to work it must be bound to an interface definition .