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
This can used to create an alternate tag for your module, functions etc.
187
244
245
+
- Syntax
246
+
247
+
```lua
248
+
---@tag <name>
249
+
```
250
+
251
+
- Input
252
+
188
253
```lua
189
254
---@tag cool-tag
190
255
---@tag another-cool-tag
191
256
```
192
257
258
+
- Output
259
+
193
260
```
194
261
*cool-tag*
195
262
*another-cool-tag*
@@ -199,10 +266,14 @@ This can used to create an alternate tag for your module, functions etc.
199
266
200
267
This tag can be used to add a divider/separator between section or anything you desire
201
268
269
+
- Syntax
270
+
202
271
```lua
203
272
---@divider <char>
204
273
```
205
274
275
+
- Input
276
+
206
277
```lua
207
278
---@divider -
208
279
---@divider =
@@ -223,17 +294,21 @@ This tag can be used to add a divider/separator between section or anything you
223
294
224
295
A function contains multiple tags which form its structure. Like `---@param` for parameter, `---@return` for the return value, `---@see` for other related things and `---@usage` for example
225
296
297
+
- Syntax
298
+
226
299
```lua
227
300
---@comment
228
-
---@param <name> <type><desc>
301
+
---@param <name> <type>[desc]
229
302
---@comment
230
-
---@return<type><name><desc>
303
+
---@return<type>[name] [desc]
231
304
---@see <ref>
232
305
---@usage `<code>`
233
306
```
234
307
235
308
> NOTE: All tag can be used multiple times except `---@usage`
Classes can be used to better structure your code and can be referenced as an argument to a function or it's return value. You can define it once and use it multiple times.
0 commit comments