File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ var literalTypes = {
17
17
'BooleanLiteralTypeAnnotation' : 'BooleanLiteral'
18
18
} ;
19
19
20
+ /**
21
+ * Babel parses Flow annotations in JavaScript into AST nodes. documentation.js uses
22
+ * Babel to parse JavaScript. This method restructures those Babel-generated
23
+ * objects into objects that fit the output of Doctrine, the module we use
24
+ * to parse JSDoc annotations. This lets us use Flow annotations _as_
25
+ * JSDoc annotations.
26
+ *
27
+ * @private
28
+ * @param {Object } type babel-parsed flow type
29
+ * @returns {Object } doctrine compatible type
30
+ */
20
31
function flowDoctrine ( type ) {
21
32
22
33
if ( type . type in namedTypes ) {
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ /**
4
+ * Create a tokenizer method for Remark, our Markdown processor,
5
+ * that is able to parse JSDoc inline tokens
6
+ *
7
+ * @private
8
+ * @param {string } type the destination type of the parsed objects
9
+ * @param {RegExp } regex regular expression for extracting content
10
+ * from text
11
+ * @returns {Function } tokenizer
12
+ */
3
13
function makeTokenizer ( type , regex ) {
4
14
var tokenizer = function ( eat , value , silent ) {
5
15
var match = regex . exec ( value ) ;
Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ Server.prototype.stop = function (callback) {
100
100
} . bind ( this ) ) ;
101
101
} ;
102
102
103
+ /**
104
+ * A placeholder method that will be called instead of `callback` if
105
+ * callback is omitted for the server control methods
106
+ * @private
107
+ * @returns {undefined } doesn't return anything
108
+ */
103
109
function noop ( ) { }
104
110
105
111
module . exports = Server ;
You can’t perform that action at this time.
0 commit comments