-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify that type aliases and interfaces, as well as members for these, have documentation #223
Comments
While we are doing this, we should enforce the correct way to document types for TypeScript files. Although the JSDoc documentation suggests using |
How would we do this for inferred types, e.g., from /**
* @property bar - Baz.
*/
type Foo = Infer<typeof FooStruct>; |
@Mrtenz Hmm... That's a good point. I said that TypeDoc doesn't support /**
* ContactEntry representation
*
* @property address - Hex address of a recipient account
* @property name - Nickname associated with this address
* @property importTime - Data time when an account as created/imported
*/
export interface ContactEntry {
/** Hello I am an address */
address: string;
name: string;
importTime?: number;
} TypeDoc produces: As you can see, the box at the top includes the And of course here's what VSCode shows when you hover over Maybe using |
Revisiting this. It appears that TypeDoc and VSCode more or less do what we want here, but require some tweaks. So I think in order to truly support this we would want to:
|
This seems to be the case for IntelliJ IDEA as well. Using We could start by opening issues in those projects? |
@Mrtenz Yup, absolutely. I'll start by doing that. |
Currently if we have an interface like:
or a type alias like:
we are not required to supply documentation for these. This seems inconsistent with our rules. I think we should try to provide documentation for types as much as possible so that we can always look them up in our editors (and such documentation is useful when we publish tsdocs eventually).
We should be able to achieve this by configuring the
require-jsdoc
rule like so: gajus/eslint-plugin-jsdoc#647The text was updated successfully, but these errors were encountered: