-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathShare.ts
34 lines (31 loc) · 1.07 KB
/
Share.ts
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
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { NodeLibcurlNativeBinding } from './types'
import { CurlShareOption } from './enum/CurlShareOption'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const bindings: NodeLibcurlNativeBinding = require('../lib/binding/node_libcurl.node')
/**
* This is a Node.js wrapper around the binding {@link EasyNativeBinding | native Easy class}.
*
* The only extra is that it provides a static field `option` and `lock`.
*
* @public
*/
class Share extends bindings.Share {
/**
* Options to be used with {@link setOpt | `setOpt`}.
*
* See the official documentation of [`curl_share_setopt()`](http://curl.haxx.se/libcurl/c/curl_share_setopt.html)
* for reference.
*
* `CURLSHOPT_SHARE` becomes `Share.option.SHARE`
*
* @deprecated Use {@link CurlShareOption|`CurlShareOption`} directly instead.
*/
static option = CurlShareOption
}
export { Share }