I am breaking up my now too large code file into smaller size class objects, leaving out un-necessary develop time functions. The user will add additional functionality by attaching functions.
When I attempt to use either the 'extends' or 'super' keyword
>Uncaught TypeError: Can't extend undefined
at line 3 col 134
...jscomp.setPrototypeOf;c(a,b)}else for(c in b)if("prototype"!...
^
in function "inherits" called from line 4 col 168
...omp.inherits(Square,Polygon);$jscomp.global.Object.definePro...
^
Note that I never specified an 'inherits' function.
Is there support for both keywords?
EDIT Wed 2018.09.26
After many more divide and conquer attempts found that:
The answer is yes. Here is an example where a line of code produces an unexpected and unusual error. How good are your debug skills? See if you can spot it!
See the function definitions from the MDN docs. Despite this isn't detected as a syntax error, the run-time error occurs.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Tue 2018.09.25
I am breaking up my now too large code file into smaller size class objects, leaving out un-necessary develop time functions. The user will add additional functionality by attaching functions.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends
When I attempt to use either the 'extends' or 'super' keyword
Note that I never specified an 'inherits' function.
Is there support for both keywords?
EDIT Wed 2018.09.26
After many more divide and conquer attempts found that:
The answer is yes. Here is an example where a line of code produces an unexpected and unusual error. How good are your debug skills? See if you can spot it!
See the function definitions from the MDN docs. Despite this isn't detected as a syntax error, the run-time error occurs.
1 Attachment