You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for inferring private based on the name
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.
For example:
```js
/** C */
class C {
/** I'm public */
m() {}
/** I'm private */
_p() {}
}
```
Fixes#436
"code": "/**\n * This is inferred to be private.\n */\nfunction _p() {}\n\n/** C */\nclass C {\n /** m */\n m() {}\n /** This is also inferred to be private. */\n _p() {}\n}\n",
5
+
"loc": {
6
+
"end": {
7
+
"column": 1,
8
+
"line": 12
9
+
},
10
+
"start": {
11
+
"column": 0,
12
+
"line": 7
13
+
}
14
+
}
15
+
},
16
+
"description": {
17
+
"children": [
18
+
{
19
+
"children": [
20
+
{
21
+
"position": {
22
+
"end": {
23
+
"column": 2,
24
+
"line": 1,
25
+
"offset": 1
26
+
},
27
+
"indent": [],
28
+
"start": {
29
+
"column": 1,
30
+
"line": 1,
31
+
"offset": 0
32
+
}
33
+
},
34
+
"type": "text",
35
+
"value": "C"
36
+
}
37
+
],
38
+
"position": {
39
+
"end": {
40
+
"column": 2,
41
+
"line": 1,
42
+
"offset": 1
43
+
},
44
+
"indent": [],
45
+
"start": {
46
+
"column": 1,
47
+
"line": 1,
48
+
"offset": 0
49
+
}
50
+
},
51
+
"type": "paragraph"
52
+
}
53
+
],
54
+
"position": {
55
+
"end": {
56
+
"column": 2,
57
+
"line": 1,
58
+
"offset": 1
59
+
},
60
+
"start": {
61
+
"column": 1,
62
+
"line": 1,
63
+
"offset": 0
64
+
}
65
+
},
66
+
"type": "root"
67
+
},
68
+
"errors": [],
69
+
"kind": "class",
70
+
"loc": {
71
+
"end": {
72
+
"column": 8,
73
+
"line": 6
74
+
},
75
+
"start": {
76
+
"column": 0,
77
+
"line": 6
78
+
}
79
+
},
80
+
"members": {
81
+
"events": [],
82
+
"instance": [
83
+
{
84
+
"context": {
85
+
"code": "/**\n * This is inferred to be private.\n */\nfunction _p() {}\n\n/** C */\nclass C {\n /** m */\n m() {}\n /** This is also inferred to be private. */\n _p() {}\n}\n",
0 commit comments