tc39 / proposal-type-annotations

ECMAScript proposal for type syntax that is erased - Stage 1
https://tc39.es/proposal-type-annotations/
4.26k stars 46 forks source link

Readme Feedback - WIP #13

Closed romulocintra closed 2 years ago

romulocintra commented 2 years ago

Hi

I would be happy to create pull requests to address some of the comments below, at this point using this to take notes while I review de readme and not create too much noise having an issue per comment.

BTW super excited about this :)

1. Would reinforce the idea that we are not bringing Typescript to the browser and avoid possible misleading messages or interpretations of the readme

https://mobile.twitter.com/seldo/status/1135150260425318400 image

2. Deno

The Deno runtime (a competitor to Node.js, written by the original creator of Node.js) uses TypeScript as its primary source language. Since Deno works with an up-to-date version of the V8 JavaScript engine, erasing TypeScript types is the only meaningful compilation step for Deno. If they didn't need to erase TypeScript types, the Deno runtime could use .ts files directly.

3. Proposal #19 and #26

Please note that the types do not have to conform to the TypeScript (or any other) type system. It is only when the TypeScript (or other) type checker checks the source code that errors are emitted if the types are incorrect or have bad syntax.

giltayar commented 2 years ago
  1. In some ways, we are bring TypeScript to the browser, because TypeScript code will be able to run without modifications. And since we are clarifying that we're not doing any typechecking and that TypeScript is just one option among many that will now be available in the browser. Also, we're also explicitly saying (If I remember correctly) that we are not standardizing TS.

I believe the FAQ answer in https://github.com/giltayar/types-as-comments-proposal#how-does-this-proposal-relate-to-typescript pretty much says it all. Do you believe there is anything additional to say besides this.

I would love to see a PR that changes this paragraph. I definitely agree it needs rewording.

romulocintra commented 2 years ago

Hi @giltayar thanks for your feedback.

About :

  1. I agree with you, FAQ states perfectly and addresses all my concerns, wondering if we should add a note or disclaimer pointing to FAQ from the initial paragraphs - just a nice to have thing.

  2. After a full review will try to come with some rewording. Thanks for your feedback

romulocintra commented 2 years ago

Reviewed and changes where proposed