swyxio / swyxdotio

This is the repo for swyx's blog - Blog content is created in github issues, then posted on swyx.io as blog pages! Comment/watch to follow along my blog within GitHub
https://swyx.io
MIT License
325 stars 43 forks source link

"I know for a fact that the TypeScript team doesn't like this." #428

Closed lillallol closed 2 years ago

lillallol commented 2 years ago

In this video, it is mentioned that:

I know for a fact that the TypeScript team does not like this. The JSDoc typing stuff is meant to be a stepping stone to TypeScript and now people are using it to step away from TypeScript. They do not like that.

  1. I do not understand what do you mean by saying "step away". I am writing all my types in .ts files and import them via JSDoc comments in .js files, and I still have to tsc --noEmit, i.e. download the TypeScript package. How is this making me step away from TypeScript?
  2. Why would the TypeScript team not like that? It is superior in every way when compared to the compile method?
swyxio commented 2 years ago
  1. because you're not writing your source code fully in .ts files. its just less typey
  2. usually there is less typechecking inside of function boundaries (a bit easier to make mistakes)
lillallol commented 2 years ago

because you're not writing your source code fully in .ts files.

So when you say "step away" you mean not writing both concretions and abstractions in .ts files?

its just less typey

Do you mean there is less static type safety?

usually there is less typechecking inside of function boundaries (a bit easier to make mistakes)

I do not fully understand what you mean. Can you please provide an example?

swyxio commented 2 years ago

You can ask any typescript fan, unfortunately I don't know how to explain any more specifically. Maybe Josh Goldberg or Matt Pocock

lillallol commented 2 years ago

I don't know how to explain any more specifically. Maybe Josh Goldberg or Matt Pocock

Correct me if I am wrong, a quick google search makes me understand that these people do not belong to the typescript team.

Who are the people that have informed you that:

the TypeScript team doesn't like this

so that I can have a discussion with them?