Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions style.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,9 @@ should use `public`, but AngularJS should use `protected`.
> Warning: Getters and setters have to be transpiled into bloated code.
> It is a good practice to avoid using getters and setters in general.

Getters and setters for class members may be used. The getter method must be a
[pure function](https://en.wikipedia.org/wiki/Pure_function) (i.e., result is
consistent and has no side effects). They are also useful as a means of
restricting the visibility of internal or verbose implementation details (shown
below).
Getters and setters for class members may be used. The getter method must have
no side effects. They are also useful as a means of restricting the visibility
of internal or verbose implementation details (shown below).

```ts {.good}
class Foo {
Expand Down