I can see why people like TypeScript, but personally I don't like the overhead of working with it and rather write plain JS.
However, for expressing types and documentation I think TypeScript is a great tool.
I came up with the idea of using TypeScript typings solely for documentation, in a separate file like this. This gives you auto-completion and inline docs without disturbing the main coding workflow.
And you can use tools like typedoc to generate documentation.
Not more than writing other kinds of external documentation.
I think it is a nice approach for packages with a small scope, but you are right, for internal-only code I would also prefer documentation inline with code since it is easier to think about updating it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I can see why people like TypeScript, but personally I don't like the overhead of working with it and rather write plain JS.
However, for expressing types and documentation I think TypeScript is a great tool.
I came up with the idea of using TypeScript typings solely for documentation, in a separate file like this. This gives you auto-completion and inline docs without disturbing the main coding workflow.
And you can use tools like typedoc to generate documentation.
I like this idea of a different file for the documentation, but is that not a pain in the a** to maintain ?
Not more than writing other kinds of external documentation.
I think it is a nice approach for packages with a small scope, but you are right, for internal-only code I would also prefer documentation inline with code since it is easier to think about updating it.