When confirming class types, two checks are sometimes needed to ensure an
object is viable as methods can be accidentally deleted.
The object should be first checked for a valid type, to make sure the
expected prototype methods are there.
type_czech.checkParam_type(class_variable, "the-class-name")
Then, the object's interface should be checked just in case a needed method
no longer resides in the object. In the example to the left, the showPerson() method is deleted. Checking the
objects type doesn't reveal any issues. But the missing method is caught
by the below call.
type_czech.check_interface(a_person, PERSON_INTERFACE)
Note that the Person Class must be declared before the below linking code, or
a reference error is generated stating
"can't access lexical declaration 'Person' before initialization"
/**/ Person = type_czech.linkUp(Person, undefined, POST_check_Person)