GitHub Package
the javascript
31 - Extended Class Type Checks

It is possible to get PRE and POST checking on class objects that will be extended; both constructor functions and methods.

But the class declarations must be interleaved with the linking of classes to TypeCzech. Classes must be linked to TypeCzech before being extended because there is no hoisting for Classes.

As in the example to the left, calls to type_czech.linkUp() must precede class extensions.
class First {...}

/**/ First = type_czech.linkUp(First, ...)

class Last extends First{  

/**/ Last = type_czech.linkUp(Last, ...)

class Full extends Last {...}

/**/ Full = type_czech.linkUp(Full...)
The ordering and depth of executions is recorded in the console to highlight the different stages and states.

Console Output

Contents 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43    101 102 103 201 202 203 204 301 302 303 304 401 402 403 404 501 502 503 504 601 602 603 604    700 701 702 703 704 705 706 707 708 709 710 © 2024 Steen Hansen