32 - Extended Closure Type Checks
by steen_hansen
HTML
<!DOCTYPE html><meta charset="utf-8" />
<title>32 Extended Closure Type Checks</title>
<div id='js-div' style="width:62%; ">
<a href='https://github.com/steenhansen/type-czech' target="_blank" class='git-hub'>GitHub Package</a>
<div id='js-code'>the javascript</div>
</div>
<div id="the-explanation" style="width:38%">
<div class='an-explantion'>32 - Extended Closure Type Checks</div>
<div id='explanation-text'>
<br>
It is possible to get PRE and POST checking on closures
that will be extended; both on its creation and the contained functions.
<br><br>
But unlike with classes, closure declarations can be in any order with respect
to TypeCzech because of function hoisting.
With the example to the left, the functions and the linkUp()
calls can be in any order, as below.
<pre>
/**/ Full = type_czech.linkUp(Full, ...)
function Full {}
function Last {}
/**/ Last = type_czech.linkUp(Last, ...)
/**/ First = type_czech.linkUp(First, ...)
fuction First{}
</pre>
The ordering and depth of executions is recorded in the console to
highlight the different stages and states.
<br><br>
</div>
<div id="console-log" >
<div class='a-title'>Console Output</div>
<div id='log-text'></div>
<br>
</div>
<br>
<!-- ---------------TYPE 1--------------------------- -->
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/consolelog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/TypeCzech.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/type-czech.css">
<!-- ----------------TYPE 1-------------------------- -->
<div id='js-fiddles'>
<a title="Example-Contents" href="https://jsfiddle.net/steen_hansen/1Lshcept/?Example-Contents" target="_blank">Contents</a>
<a title="00-Readme-Example"...