my favorite thing about kubejs is how it doesn't actually print the location of an exception, just the message, so that it's impossible to find the actual issue
oho, this error has a line number! and is complaining about...a const declaration in an if block...............ok so apparently const is not block scoped in rhino??
i didn't realize the situation with rhino was so dire. this barely qualifies as a js runtime.
i remember shit like strings crossing the boundary from java into js are objects that behave like strings but are not instanceof String, but i had no idea how truly bad it was in here
oh right there's also the thing where the java map interface plays at being a plain js object except that it has all the methods from map and if you have an entry with one of those methods' names as a key then it shadows the method but the in operator is busted too
i think maybe i should dust off my handwritten kubejs typescript definitions and compile to es5 like i was doing for 1.16 >_>