koffi 2.5.2 → 2.5.3

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 (24) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/{2.5.2 → 2.5.3}/koffi_win32_arm64/koffi.node +0 -0
  3. package/build/{2.5.2 → 2.5.3}/koffi_win32_ia32/koffi.node +0 -0
  4. package/build/{2.5.2 → 2.5.3}/koffi_win32_x64/koffi.node +0 -0
  5. package/package.json +2 -2
  6. package/src/index.d.ts +12 -7
  7. /package/build/{2.5.2 → 2.5.3}/koffi_darwin_arm64/koffi.node +0 -0
  8. /package/build/{2.5.2 → 2.5.3}/koffi_darwin_x64/koffi.node +0 -0
  9. /package/build/{2.5.2 → 2.5.3}/koffi_freebsd_arm64/koffi.node +0 -0
  10. /package/build/{2.5.2 → 2.5.3}/koffi_freebsd_ia32/koffi.node +0 -0
  11. /package/build/{2.5.2 → 2.5.3}/koffi_freebsd_x64/koffi.node +0 -0
  12. /package/build/{2.5.2 → 2.5.3}/koffi_linux_arm32hf/koffi.node +0 -0
  13. /package/build/{2.5.2 → 2.5.3}/koffi_linux_arm64/koffi.node +0 -0
  14. /package/build/{2.5.2 → 2.5.3}/koffi_linux_ia32/koffi.node +0 -0
  15. /package/build/{2.5.2 → 2.5.3}/koffi_linux_riscv64hf64/koffi.node +0 -0
  16. /package/build/{2.5.2 → 2.5.3}/koffi_linux_x64/koffi.node +0 -0
  17. /package/build/{2.5.2 → 2.5.3}/koffi_openbsd_ia32/koffi.node +0 -0
  18. /package/build/{2.5.2 → 2.5.3}/koffi_openbsd_x64/koffi.node +0 -0
  19. /package/build/{2.5.2 → 2.5.3}/koffi_win32_arm64/koffi.exp +0 -0
  20. /package/build/{2.5.2 → 2.5.3}/koffi_win32_arm64/koffi.lib +0 -0
  21. /package/build/{2.5.2 → 2.5.3}/koffi_win32_ia32/koffi.exp +0 -0
  22. /package/build/{2.5.2 → 2.5.3}/koffi_win32_ia32/koffi.lib +0 -0
  23. /package/build/{2.5.2 → 2.5.3}/koffi_win32_x64/koffi.exp +0 -0
  24. /package/build/{2.5.2 → 2.5.3}/koffi_win32_x64/koffi.lib +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  ### Koffi 2.5
6
6
 
7
+ #### Koffi 2.5.3
8
+
9
+ **Main changes:**
10
+
11
+ - Add missing union exports in TS definition file
12
+ - Fix some parameter names in TS definition file
13
+
7
14
  #### Koffi 2.5.2
8
15
 
9
16
  **Main changes:**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koffi",
3
- "version": "2.5.2",
4
- "stable": "2.5.2",
3
+ "version": "2.5.3",
4
+ "stable": "2.5.3",
5
5
  "description": "Fast and simple C FFI (foreign function interface) for Node.js",
6
6
  "keywords": [
7
7
  "foreign",
package/src/index.d.ts CHANGED
@@ -86,8 +86,13 @@ declare module 'koffi' {
86
86
  export function pack(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
87
87
  export function pack(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
88
88
 
89
- // export function union(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
90
- // export function union(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
89
+ export function union(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
90
+ export function union(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
91
+
92
+ export class Union {
93
+ constructor(type: TypeSpec);
94
+ [s: string]: any;
95
+ }
91
96
 
92
97
  export function array(ref: TypeSpec, len: number, hint?: ArrayHint | null): IKoffiCType;
93
98
 
@@ -96,12 +101,12 @@ declare module 'koffi' {
96
101
  /** @deprecated */ export function handle(name: string): IKoffiCType;
97
102
  /** @deprecated */ export function handle(): IKoffiCType;
98
103
 
99
- export function pointer(value: TypeSpec): IKoffiCType;
100
- export function pointer(value: TypeSpec, asteriskCount: number): IKoffiCType;
101
- export function pointer(name: string, value: TypeSpec, asteriskCount: number): IKoffiCType;
104
+ export function pointer(ref: TypeSpec): IKoffiCType;
105
+ export function pointer(ref: TypeSpec, asteriskCount: number): IKoffiCType;
106
+ export function pointer(name: string, ref: TypeSpec, asteriskCount: number): IKoffiCType;
102
107
 
103
- export function out(value: TypeSpec): IKoffiCType;
104
- export function inout(value: TypeSpec): IKoffiCType;
108
+ export function out(type: TypeSpec): IKoffiCType;
109
+ export function inout(type: TypeSpec): IKoffiCType;
105
110
 
106
111
  export function disposable(type: TypeSpec): IKoffiCType;
107
112
  export function disposable(name: string, type: TypeSpec): IKoffiCType;