From 55536447cad5502a46a37a834f11a4e7910c784d Mon Sep 17 00:00:00 2001 From: Joey Aufgang Date: Mon, 10 May 2021 18:23:28 -0400 Subject: [PATCH] Changed getter style to say "getter should have no side effects" instead of should be a pure function --- style.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/style.md b/style.md index b9c1528..0250533 100644 --- a/style.md +++ b/style.md @@ -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 {