@UsuallySarcasm Yes, it reached the level where browser vendors enabled their engines to understand both optional chaining (?) and Nullish Coalescing (??), so the TypeScript compiler isn't technically necessary anymore to use these features.
@mejutoco First, tmp.length might be 1, in that case tmp[1] would be undefined. Second, you're declaring el_type inside the if condition, it doesn't exist outside the block:
Try:
let el_type = "":
if(tmp.length => 1) {
el_type = tmp[1];
}
Or, fancy:
const el_type = tmp[1] ?? "";
@UriGoldshtein It looks like overloading function expressions (as opposed to function declarations) is generally not possible with TS: https://t.co/7gaEi133Cl
@elmd_ What anti-virus software ... does not impact performance.
... sorry, the only zero-overhead AV is not going where you shouldn't / not downloading stuff you cannot verify.