Virtual
Userland, runtime-checked virtual classes for ES6.
Pass in NODE_ENV=development
to get runtime checks. Pass in NODE_ENV=production
to disable them.
Example
// create a new class with 2 virtual methodsconst AbstractClass = ; { super; } { console; } { super; } { console; }let didThrow = false;try // 2 missing implems ;catcherr didThrow = true;didThrowshouldbetrue; didThrow = false;try // 1 missing implem ;catcherr didThrow = true;didThrowshouldbetrue; didThrow = false;try ;catcherr didThrow = true;didThrowshouldbefalse;