Skip to content

Commit 4ed5edf

Browse files
timdptmcw
authored andcommittedMar 8, 2018
feat: Support class property @type tag (#1028)
1 parent 99ad49b commit 4ed5edf

File tree

3 files changed

+821
-179
lines changed

3 files changed

+821
-179
lines changed
 

‎__tests__/__snapshots__/test.js.snap

+793-178
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* This is for issue 906.
3+
*/
4+
export class Issue906 {
5+
/**
6+
* This is a read-write property.
7+
* @type {boolean}
8+
*/
9+
get readWriteProp() {
10+
return this._rw;
11+
}
12+
13+
set readWriteProp(value) {
14+
this._rw = value;
15+
}
16+
17+
/**
18+
* This is a read-only property.
19+
* @type {string}
20+
* @readonly
21+
*/
22+
get readOnlyProp() {
23+
return 'foo';
24+
}
25+
}

‎src/parse.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ const flatteners = {
386386
result.todos.push(parseMarkdown(tag.description));
387387
},
388388
tutorial: todo,
389-
type: todo,
389+
type(result, tag) {
390+
result.type = tag.type;
391+
},
390392
typedef: flattenKindShorthand,
391393
var: synonym('member'),
392394
/**

0 commit comments

Comments
 (0)
Please sign in to comment.