Geoffrey Booth

Results 425 comments of Geoffrey Booth

> given the mention of a compiler flag for TypeScript: this might be worth reconsidering. I think this is definitely on the table; this was on my mind on the...

> if you hover over `height` in the last line of your example, then it says `height: undefined`. That’s the TypeScript playground, so it’s expecting TypeScript input. If you paste...

You could [define the entire type explicitly](https://www.typescriptlang.org/play?filetype=js#code/PQKhFgCgAIWgBALgTwA4FMAm6Bm0BK6AxogIYB2A5gDbpSwKoBOA9hkytAN7kCuAtgCN0TAL7QA7gEtMiABb048ZmxGceA4WOhNSiKS0WNW7dXyEjxAbTnoplOYgC6i4FFBKUGboRIUa6OIgbpAAbqRMOsRkVLTQALzQAPKCAFbRAHTYOFLk6AAKJmpS6ADOABRc9JIy8gBc0ACMAEwADK0ANNW6+iwNjQBs0MDQAJxQoh3c1bb2jg1VMNDLlOiI5QCU00vLy0xrvEzk0PJSpRnSsnLDJ3JnGT0GANzVy5Ov0KVr5eHUW4u7Xb7RCHY6nc6XeQJaC-Bjgh56Z4fUTVFGQUQbF6QKBEFjkUosWgZagsSjlfZ+WLoDKzByITFQIA): ```js /** * @typedef Rectangle * @property {number} width * @property {number} ratio * @property {number} [height] */ /** @type {Rectangle} */ var...

Yes, the block comments shouldn’t be hoisted with the `var` declarations. That’s a useless place for the comments to be output, and as you point out, it breaks JSDoc. The...

> I feel like moving in that direction is the opposite of the spirit of what CoffeeScript was trying to accomplish in the first place. Yes, arguably it is. My...

> So CoffeeScript has great, whitespace significant syntax, is expression-based, but lacks type-checking and a second crucial tool of today - pretty-printing. CoffeeScript already supports type checking via Flow: https://coffeescript.org/#type-annotations....

> What about to enable compiler plugins for parsing (tokenizer, lexer) and output? > So we don't need to fork coffee when new ideas come. Yes, that would be great....

TypeScript supports reading types from JSDoc comments, which CoffeeScript already supports. I've been meaning to write a section in the docs explaining this; if anyone wants to beat me to...

> 2\. If I import the CS the code works exactly the same but no typings. I’m not sure what this means. The TypeScript compiler doesn’t support CoffeeScript files, that...

> I [started a branch](https://github.com/edemaine/coffeescript/tree/typescript?rgh-link-date=2021-03-21T21%3A45%3A38Z) that adds basic type annotation support. This is very impressive! Great work! A few preliminary thoughts: - I’m wary about breaking backward compatibility. If the...