- variable declarations
- function declarations
- object properties assigned to during object creation
+- class fields
+- class methods
It will not catch disallowed identifiers that are:
var itemSet = {
data: [...]
};
+
+class Foo {
+ data = [];
+}
+
+class Foo {
+ #data = [];
+}
+
+class Foo {
+ callback( {);
+}
+
+class Foo {
+ #callback( {);
+}
```
Examples of **correct** code for this rule with sample `"data", "callback"` restricted identifiers:
foo.callback(); // all function calls are ignored
foo.data; // all property names that are not assignments are ignored
+
+class Foo {
+ items = [];
+}
+
+class Foo {
+ #items = [];
+}
+
+class Foo {
+ method( {);
+}
+
+class Foo {
+ #method( {);
+}
```
## When Not To Use It