DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.56k stars 33 forks source link

Call chains now interpreted as extra arguments #1597

Closed bbrk24 closed 1 week ago

bbrk24 commented 1 week ago
[1, 2, 3]
  .map 
    (x) => x + ".0"
  .join ", "

Intuitive compilation:

[1, 2, 3]
  .map(
    (x) => x + ".0"
  ).join(", ")

Current compilation:

[1, 2, 3]
  .map(
    (x) => x + ".0",
    ($) => $.join(", ")
  )

Another bad example:

await bot
  .once
    'ready'
    (bot) => // TODO
  .login config.bot.token