bun-types 1.1.28 → 1.1.29-canary.20240921T140458

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.
Files changed (2) hide show
  1. package/ffi.d.ts +13 -0
  2. package/package.json +1 -1
package/ffi.d.ts CHANGED
@@ -337,6 +337,10 @@ declare module "bun:ffi" {
337
337
  */
338
338
  u64_fast = 16,
339
339
  function = 17,
340
+
341
+ napi_env = 18,
342
+ napi_value = 19,
343
+ buffer = 20,
340
344
  }
341
345
 
342
346
  type Pointer = number & { __pointer__: null };
@@ -372,6 +376,9 @@ declare module "bun:ffi" {
372
376
  [FFIType.i64_fast]: number | bigint;
373
377
  [FFIType.u64_fast]: number | bigint;
374
378
  [FFIType.function]: Pointer | JSCallback; // cannot be null
379
+ [FFIType.napi_env]: unknown;
380
+ [FFIType.napi_value]: unknown;
381
+ [FFIType.buffer]: NodeJS.TypedArray | DataView;
375
382
  }
376
383
  interface FFITypeToReturnsType {
377
384
  [FFIType.char]: number;
@@ -404,6 +411,9 @@ declare module "bun:ffi" {
404
411
  [FFIType.i64_fast]: number | bigint;
405
412
  [FFIType.u64_fast]: number | bigint;
406
413
  [FFIType.function]: Pointer | null;
414
+ [FFIType.napi_env]: unknown;
415
+ [FFIType.napi_value]: unknown;
416
+ [FFIType.buffer]: NodeJS.TypedArray | DataView;
407
417
  }
408
418
  interface FFITypeStringToType {
409
419
  ["char"]: FFIType.char;
@@ -436,6 +446,9 @@ declare module "bun:ffi" {
436
446
  ["function"]: FFIType.pointer; // for now
437
447
  ["usize"]: FFIType.uint64_t; // for now
438
448
  ["callback"]: FFIType.pointer; // for now
449
+ ["napi_env"]: FFIType.napi_env;
450
+ ["napi_value"]: FFIType.napi_value;
451
+ ["buffer"]: FFIType.buffer;
439
452
  }
440
453
 
441
454
  type FFITypeOrString = FFIType | keyof FFITypeStringToType;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.28",
2
+ "version": "1.1.29-canary.20240921T140458",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",