bare-buffer 3.0.1 → 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 CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as buffer from '.'
2
2
 
3
+ type BufferConstructor = typeof buffer.Buffer
4
+
3
5
  declare global {
4
- interface Buffer extends buffer.Buffer {}
6
+ type Buffer = buffer.Buffer
5
7
 
6
- class Buffer extends buffer.Buffer {}
8
+ const Buffer: BufferConstructor
7
9
  }
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'
@@ -177,9 +179,7 @@ declare namespace Buffer {
177
179
  length?: number
178
180
  ): Buffer
179
181
 
180
- export const constants: { MAX_LENGTH: number; MAX_STRING_LENGTH: number }
181
-
182
- export { Buffer, BufferEncoding }
182
+ export { Buffer, type BufferEncoding, constants }
183
183
  }
184
184
 
185
185
  export = Buffer
@@ -0,0 +1,3 @@
1
+ declare const constants: { MAX_LENGTH: number; MAX_STRING_LENGTH: number }
2
+
3
+ export = constants
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "bare-buffer",
3
- "version": "3.0.1",
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
- "./package": "./package.json",
11
11
  "./global": {
12
12
  "types": "./global.d.ts",
13
13
  "default": "./global.js"
14
14
  },
15
- "./constants": "./lib/constants.js"
15
+ "./constants": {
16
+ "types": "./lib/constants.d.ts",
17
+ "default": "./lib/constants.js"
18
+ }
16
19
  },
17
20
  "files": [
18
21
  "index.js",