Skip to content

Commit b55b135

Browse files
committed
docs: major improvements to tsdoc
1 parent f032369 commit b55b135

22 files changed

+543
-166
lines changed

lib/Curl.ts

Lines changed: 193 additions & 78 deletions
Large diffs are not rendered by default.

lib/Easy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { NodeLibcurlNativeBinding } from './types'
99
const bindings: NodeLibcurlNativeBinding = require('../lib/binding/node_libcurl.node')
1010

1111
/**
12-
* Easy Class
12+
* This is a Node.js wrapper around the binding {@link EasyNativeBinding | native Easy class}
1313
*
1414
* @public
1515
*/

lib/Multi.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ import { NodeLibcurlNativeBinding } from './types'
99
const bindings: NodeLibcurlNativeBinding = require('../lib/binding/node_libcurl.node')
1010

1111
/**
12-
* Multi class
12+
* This is a Node.js wrapper around the binding {@link MultiNativeBinding | native Multi class}.
13+
*
14+
* The only extra is that it provides a static field `option`.
1315
*
1416
* @public
1517
*/
1618
class Multi extends bindings.Multi {
1719
/**
18-
* Options to be used with `Multi.setOpt`
20+
* Options to be used with {@link setOpt | `setOpt`}.
1921
*
20-
* See the official documentation of [curl_multi_setopt()](http://curl.haxx.se/libcurl/c/curl_multi_setopt.html)
22+
* See the official documentation of [`curl_multi_setopt()`](http://curl.haxx.se/libcurl/c/curl_multi_setopt.html)
2123
* for reference.
2224
*
2325
* `CURLMOPT_MAXCONNECTS` becomes `Multi.option.MAXCONNECTS`

lib/Share.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ import { CurlShareOption } from './enum/CurlShareOption'
1010
const bindings: NodeLibcurlNativeBinding = require('../lib/binding/node_libcurl.node')
1111

1212
/**
13-
* Share class
13+
* This is a Node.js wrapper around the binding {@link EasyNativeBinding | native Easy class}.
14+
*
15+
* The only extra is that it provides a static field `option` and `lock`.
1416
*
1517
* @public
1618
*/
1719
class Share extends bindings.Share {
1820
/**
19-
* Options to be used with `Share.setOpt`
21+
* Options to be used with {@link setOpt | `setOpt`}.
2022
*
21-
* See the official documentation of [curl_share_setopt()](http://curl.haxx.se/libcurl/c/curl_share_setopt.html)
23+
* See the official documentation of [`curl_share_setopt()`](http://curl.haxx.se/libcurl/c/curl_share_setopt.html)
2224
* for reference.
2325
*
2426
* `CURLSHOPT_SHARE` becomes `Share.option.SHARE`
27+
*
28+
* @deprecated Use {@link CurlShareOption|`CurlShareOption`} directly instead.
2529
*/
2630
static option = CurlShareOption
2731
}

lib/enum/CurlFeature.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
/**
9+
* Flags to be used with {@link "Curl".Curl.enable | `Curl#enable`} and {@link "Curl".Curl.disable | `Curl#disable`}
910
* @public
1011
*/
1112
export enum CurlFeature {

lib/enum/CurlFileType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
// https://github.com/curl/curl/blob/e1be8254534898/include/curl/curl.h#L264
88
/**
9-
* Object with constants on the `FileInfo` object,
9+
* Object with constants on the {@link FileInfo | `FileInfo`} object,
1010
* used alongside the `CHUNK_BGN_FUNCTION` option
1111
*
1212
* `CURLFILETYPE_DEVICE_BLOCK` becomes `CurlFileType.DeviceBlock`

lib/enum/CurlPause.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
// https://github.com/curl/curl/blob/e1be8254/include/curl/curl.h#L2828
88
/**
9-
* Options to be used with `Easy.pause` or `Curl.pause`
9+
* Options to be used with {@link "Easy".Easy.pause | `Easy#pause`} and {@link "Curl".Curl.pause | `Curl#pause`}.
1010
*
1111
* `CURLPAUSE_RECV_CONT` becomes `CurlPause.RecvCont`
1212
*

lib/enum/CurlRtspRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// https://github.com/curl/curl/blob/e1be82545348/include/curl/curl.h#L1987
88
/**
99
* Object with constants for option `RTSP_REQUEST`
10-
* Only available on libcurl \>= 7.20
10+
* Only available on libcurl >= 7.20
1111
*
1212
* `CURL_RTSPREQ_OPTIONS` becomes `CurlRtspRequest.Options`
1313
*

lib/enum/CurlShareLock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
// https://github.com/curl/curl/blob/e1be82545348/include/curl/curl.h#L2643
88
/**
9-
* Options to be used with the `Curl.share.SHARE` and `Curl.share.UNSHARE` options.
9+
* Options to be used when setting `SHARE` or `UNSHARE` with {@link "Share".Share.setOpt | `Share#setOpt`}.
1010
*
1111
* `CURL_LOCK_DATA_SSL_SESSION` becomes `CurlShareLock.DataSslSession`
1212
*

lib/enum/CurlShareOption.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// https://github.com/curl/curl/blob/e1be82545348/include/curl/curl.h#L2685
88
// not following enum naming convention on this one to keep consistent with other curl options
99
/**
10+
* Options to be used with {@link "Share".Share.setOpt | `Share#setOpt`}.
11+
*
1012
* @public
1113
*/
1214
export enum CurlShareOption {

0 commit comments

Comments
 (0)