|
|
|
|
|
by CapsAdmin
1348 days ago
|
|
You can use some jsdoc in typescript, see https://www.typescriptlang.org/docs/handbook/jsdoc-supported... However I tend to only use /** a comment */ before a type definition or argument which will add the comment along with the type in autocomplete. I get the feeling you've stumbled more on the debate about commenting code/inline docs vs code that self documents. My general impression of Javascript developers is that they are comfortable adding comments whereas Typescript people are not so comfortable for some reason. Maybe because a lot of them are coming from Java and C# where writing clean code⢠is more preferable to adding comments. Personally I think there's a middle ground. I've met some Javascript developers insisting on adding a comment before each statement and I've met some java developers having a no comment policy in their codebase (so that pull requests wont merge if there are comments). |
|