Join Nostr
2025-03-15 16:26:43 UTC
in reply to

B'Wera Tension on Nostr: afaik `export default const` also doesn't work - even in raw #javascript. that one's ...

afaik `export default const` also doesn't work - even in raw #javascript.

that one's because a single `const` kw can define multiple constants like `const foo = "1", bar = 2` - which one will be the default?

but typescript's `type` keyword does not in fact enable you to define multiple types like `type Foo = string, Bar = number`!

general clunkiness of es modules syntax aside, this sort of counterintuitive inconsistencies between js and ts just make #typescript feel shoddy