Skip to content
public-library›Rules›TypeScript›Define every property of a domain type

Define every property of a domain type

In a domain type or interface, give every property a one-sentence TSDoc comment defining what the term means in this domain, including units, scope, and lifecycle when they apply; when the property's type is a reusable domain type, the comment states only the property's role and extra constraints. Outside domain types, comment a property only for what its name and type can't show: what an optional or null value means, an invariant it takes part in, or a reference to something another module owns.

In the full rule