forked from documentationjs/documentation
/
nested.input.js
168 lines (150 loc) · 3.29 KB
/
nested.input.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/**
* Creates a new Klass
* @extends Stream.Writable
* @class
*/
function Klass(foo) {
this.foo = foo;
}
/**
* Get this Klass's foo
* @returns {Number} foo
* @example <caption>this shows you how to getFoo</caption>
* var x = foo.getFoo();
*/
Klass.prototype.getFoo = function() {
return this.foo;
};
/**
* A function with an options parameter
* @param {Object} options
* @param {string} options.foo
* @param {number} options.bar
* @param {?number} otherOptions
*/
Klass.prototype.withOptions = function(options, otherOptions) {};
/**
* A function with a deep options parameter
* @param {Object} options
* @param {string} options.foo
* @param {Object} options.bar
* @param {string} options.bar.buz
*/
Klass.prototype.withDeepOptions = function(options) {};
/**
* @typedef CustomError
* @name CustomError
* @description a typedef with nested properties
* @property {object} error An error
* @property {string} error.code The error's code
* @property {string} error.description The error's description
*/
/**
* Decide whether an object is a Klass instance
* This is a [klasssic]{@link Klass}
* This is a [link to something that does not exist]{@link DoesNot}
*
* @param {Object} other
* @param {*} also
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isClass = function(other, also) {
return other instanceof Klass;
};
/**
* A function that triggers the case where the autolinker doesn't find
* the referenced class type
*
* @param {Weird} other
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isWeird = function(other) {
return other instanceof Weird;
};
/**
* This method takes a Buffer object that will be linked to nodejs.org
*
* @param {Buffer|string} buf
* @param {number} [size=0] size
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isBuffer = function(buf, size) {
return other instanceof Buffer;
};
/**
* This method takes an array of buffers and counts them
*
* @param {Array<Buffer>} buffers some buffers
* @returns {number} how many
* @example
* var k = new Klass();
* k.isArrayOfBuffers();
*/
Klass.isArrayOfBuffers = function(buffers) {
return buffers.length;
};
/**
* A magic number that identifies this Klass.
*/
Klass.MAGIC_NUMBER = 42;
/**
* Get an instance of {@link Klass}. Will make
* a {@link Klass klass instance multiword},
* like a {@link Klass|klass}
*
* @returns {Klass} that class
*/
function bar() {
return new Klass(1);
}
/**
* Rest property function
* @returns {undefined} nothing
*/
function bar2(...toys: Number) {
return undefined;
}
/**
* Get an instance of {@link Klass}. Will make
* a {@link Klass klass instance multiword},
* like a {@link Klass|klass}. This needs a {@link number} input.
*
* @returns {undefined} nothing
*/
function bar3() {
return undefined;
}
/**
* Klass event
* @event event
* @memberof Klass
*/
bar();
/**
* This is Foo
*/
class Foo {
/**
* This is bar
*/
get bar() {}
}
/**
* I am the container of stream types
*/
var customStreams = {};
/**
* I am a passthrough stream that belongs to customStreams
*
* @kind class
*/
customStreams.passthrough = function() {
this.custom = true;
};
/**
* | Col 1 | Col 2 | Col 3 |
* |-------|-------|-------|
* | Dat 1 | Dat 2 | Dat 3 |
* | Dat 4 | Dat 5 | Dat 6 |
*/
var tableObj = {};