bare-buffer 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/global.d.ts +9 -0
- package/index.d.ts +8 -4
- package/lib/constants.d.ts +3 -0
- package/package.json +11 -4
package/global.d.ts
ADDED
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import constants from './lib/constants'
|
|
2
|
+
|
|
1
3
|
type BufferEncoding =
|
|
2
4
|
| 'ascii'
|
|
3
5
|
| 'base64'
|
|
@@ -9,7 +11,7 @@ type BufferEncoding =
|
|
|
9
11
|
| 'utf16le'
|
|
10
12
|
| 'utf8'
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
interface Buffer extends Uint8Array {
|
|
13
15
|
compare(
|
|
14
16
|
target: Buffer,
|
|
15
17
|
targetStart?: number,
|
|
@@ -135,9 +137,11 @@ declare class Buffer extends Uint8Array {
|
|
|
135
137
|
writeBigUInt64LE(value: bigint, offset?: number): number
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
declare
|
|
139
|
-
|
|
140
|
+
declare class Buffer extends Uint8Array {
|
|
141
|
+
constructor(arrayBuffer: ArrayBuffer, offset?: number, length?: number)
|
|
142
|
+
}
|
|
140
143
|
|
|
144
|
+
declare namespace Buffer {
|
|
141
145
|
export let poolSize: number
|
|
142
146
|
|
|
143
147
|
export function isBuffer(value: unknown): value is Buffer
|
|
@@ -175,7 +179,7 @@ declare namespace Buffer {
|
|
|
175
179
|
length?: number
|
|
176
180
|
): Buffer
|
|
177
181
|
|
|
178
|
-
export
|
|
182
|
+
export { Buffer, type BufferEncoding, constants }
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
export = Buffer
|
package/package.json
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-buffer",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Native buffers for JavaScript",
|
|
5
5
|
"exports": {
|
|
6
|
+
"./package": "./package.json",
|
|
6
7
|
".": {
|
|
7
8
|
"types": "./index.d.ts",
|
|
8
9
|
"default": "./index.js"
|
|
9
10
|
},
|
|
10
|
-
"./
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
"./global": {
|
|
12
|
+
"types": "./global.d.ts",
|
|
13
|
+
"default": "./global.js"
|
|
14
|
+
},
|
|
15
|
+
"./constants": {
|
|
16
|
+
"types": "./lib/constants.d.ts",
|
|
17
|
+
"default": "./lib/constants.js"
|
|
18
|
+
}
|
|
13
19
|
},
|
|
14
20
|
"files": [
|
|
15
21
|
"index.js",
|
|
16
22
|
"index.d.ts",
|
|
17
23
|
"global.js",
|
|
24
|
+
"global.d.ts",
|
|
18
25
|
"binding.c",
|
|
19
26
|
"binding.js",
|
|
20
27
|
"CMakeLists.txt",
|