@@ -68,14 +68,22 @@ high user value for price we pay both in maintenance, complexity, and payload si
6868leave it out.
6969
7070This applies especially so to providing two different APIs to accomplish the same thing. Always
71- prefer sticking to a _ single_ API for accomplishing something.
71+ prefer sticking to a _ single_ API for accomplishing something.
72+
73+ ### 100 column limit
74+ All code and docs in the repo should be 100 columns or fewer. This applies to TypeScript, SCSS,
75+ HTML, bash scripts, and markdown files.
7276
7377### TypeScript
7478
7579#### Typing
7680Avoid ` any ` where possible. If you find yourself using ` any ` , consider whether a generic may be
7781appropriate in your case.
7882
83+ For methods and properties that are part of a component's public API, all types must be explicitly
84+ specified because our documentation tooling cannot currently infer types in places where TypeScript
85+ can.
86+
7987#### Fluent APIs
8088When creating a fluent or builder-pattern style API, use the ` this ` return type for methods:
8189```
@@ -90,12 +98,16 @@ class ConfigBuilder {
9098#### Access modifiers
9199* Omit the ` public ` keyword as it is the default behavior.
92100* Use ` private ` when appropriate and possible, prefixing the name with an underscore.
101+ * Use ` protected ` when appropriate and possible with no prefix.
93102* Prefix * library-internal* properties and methods with an underscore without using the ` private `
94103keyword. This is necessary for anything that must be public (to be used by Angular), but should not
95104be part of the user-facing API. This typically applies to symbols used in template expressions,
96105` @ViewChildren ` / ` @ContentChildren ` properties, host bindings, and ` @Input ` / ` @Output ` properties
97106(when using an alias).
98107
108+ Additionally, the ` @docs-private ` JsDoc annotation can be used to hide any symbol from the public
109+ API docs.
110+
99111#### JsDoc comments
100112
101113All public APIs must have user-facing comments. These are extracted and shown in the documation
0 commit comments