Turning on and off JavaScript type checking with extended classes, where specification functions and
library are in one separate file. For example a PHP environment.
Load and turn on type checking, by including the type checking JavaScript file, at line 332 in the HTML section
Shows PRE() and POST() type checking calls.
<script src="43-type-check-defns.js">
No loading the type checking JavaScript file, and no type checking, at line 332 in the HTML section
No PRE(), no POST() type checking calls.
<s c r i p t s r c="43-type-check-defns.js">
// 43-type-check-defns.js consisting of logging statements
function PRE_A_one_name() { log(indent_tc + 'PRE_A_one_name()') } function POST_A_one_name() { log(indent_tc + 'POST_A_one_name()') }
function PRE_a_method() { log(indent_tc + 'PRE PRE_a_method()') } function POST_a_method() { log(indent_tc + 'POST_a_method()') }
function LINKUP_A_one_name_before_extend(){
const A_PREs = { A_one_name: PRE_A_one_name, a_method: PRE_a_method }
const A_POSTs = { A_one_name: POST_A_one_name, a_method: POST_a_method }
A_one_name = type_czech.linkUp(A_one_name, A_PREs, A_POSTs) }
function PRE_B_first_last() { log(indent_tc + 'PRE_B_first_last()') } function POST_B_first_last() { log(indent_tc + 'POST_B_first_last()') }
function PRE_b_function() { log(indent_tc + 'PRE_b_function()') } function POST_b_function() { log(indent_tc + 'POST_b_function()') }
function LINKUP_B_first_last_before_extend(){
const B_PREs = { B_first_last: PRE_B_first_last, b_function: PRE_b_function }
const B_POSTs = { B_first_last: POST_B_first_last, b_function: POST_b_function }
B_first_last = type_czech.linkUp(B_first_last, B_PREs, B_POSTs) }
function PRE_C_complete_names() { log(indent_tc + 'PRE_C_complete_names()') } function POST_C_complete_names() { log(indent_tc + 'POST_C_complete_names()') }
function PRE_c_routine() { log(indent_tc + 'PRE_c_routine()') } function POST_c_routine() { log(indent_tc + 'POST_c_routine') }
function LINKUP_C_complete_names_before_extend(){
const C_PREs = { C_complete_names: PRE_C_complete_names, c_routine: PRE_c_routine }
const C_POSTs = { C_complete_names: POST_C_complete_names, c_routine: POST_c_routine }
C_complete_names = type_czech.linkUp(C_complete_names, C_PREs, C_POSTs) }