Comments (8)
Thanks Daniel, really helpful! Read the readme like 5 times but I missed that :D
+1 for optional assignment, I never understood why it's not a thing in typescript and it's always a big bummer
conditional assignment is also very nice!
Civet has a really, really bright future 🌈
from civet.
Hmmm, I have VSC set to 4 spaces
for indentation.
If I use 2 spaces
, it works.
3 spaces
creates this weird code:
let bla = (one: string, two: string) => {
return console.log(one)
(console.log(two))
}
from civet.
@zolomatok Currently the indentation in Civet is hard coded at two spaces and most things will work correctly with that.
I'm currently working on an update to allow for arbitrary/deeper nesting. I'll let you know when it's out.
from civet.
Ah, great, thanks Daniel!
Is there an official or unofficial roadmap for Civet?
I'm very curious to get a glimpse of what state the language is in at the moment.
Seems like there's a ton of work that already been done, I mean barring a few hiccups, the language already seems to have feature parity with coffee.
from civet.
@zolomatok The short term goal is to get to 97%-99% compatibility with Coffee2 using the "civet coffeeCompat"
directive prologue. I'm running tests on the CoffeeScript codebase and fixing issues as I find them.
Then it's making sure there is a clear incremental migration path from some unfortunate Coffee inconsistencies (for in/of/from
names are swapped, not
precedence). Adding some extra features &blocks
, increasing TypeScript support... and the big one of having a really nice VSCode LSP.
This section of the Readme is a pretty good place to check: https://github.com/DanielXMoore/Civet#things-removed-from-coffeescript especially the TODOs near the bottom.
from civet.
Also possibly of interest is a Discord server which originally had the goal of adding TypeScript features to CoffeeScript but it has a #civet
channel where Daniel announces new releases and features and such, and we discuss direction.
from civet.
@zolomatok This should be fixed now (at least your specific example). Let me know if you find other cases that don't work.
from civet.
Works great, thank you!
from civet.
Related Issues (20)
- Cannot use `@#` for `this.length` in `while` condition HOT 1
- Unbounded for loop
- Arrow functions after binary operators don't parse right HOT 1
- Ref hoisting in `async do` HOT 1
- `if const` allows `?` in identifier
- Empty spread invents identifier
- try...else HOT 11
- ts-expect-error before assignment from for expression HOT 4
- `[a, ..., b] = c` doesn't declare `ref`
- Pattern matching with literals generates incorrect code
- Optional-chained operators HOT 2
- "try coalescing" / catch operator
- Type specification in `for`
- Negative index access fails on its own line
- Deep `....`rest operator HOT 2
- `::#` doesn't work in type position HOT 3
- Eliminating `return` after `loop` in some cases HOT 3
- `yield x; loop` has strange behavior
- Trailing pipe or property access should expressionize statement HOT 1
- ASI fails before symbol-typed property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civet.