Implement.js
Implement.js copied to clipboard
Incorrect error messages
If an incorrect type is passed to type it throws an error which lists correct types, currently this list fails to mention the any type
Empty object error message typo: "Empty object given to Interface(), my be an object containing only valid type() objects"
Docs + error mismatch: Docs say any JS type is a valid argument for type, but if eg 'undefined' is passed the following is shown in an error: "Must be one of 'number', 'object', 'string', 'symbol', 'function', 'boolean', or 'array'."
When extending an interface with strict mode enabled, if the base interface encounters an unexpected property it fails to say which interface was violated, instead returning undefined
Warning:
Unexpected property: 'otherMortgageLender' found on Interface(): 'undefined'.