koffi-cream 2.12.3 → 2.13.0

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/index.d.ts +19 -13
  2. package/package.json +14 -14
package/index.d.ts CHANGED
@@ -82,14 +82,14 @@ export interface IKoffiLib {
82
82
  unload(): void;
83
83
  }
84
84
 
85
- export function struct(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
85
+ export function struct(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
86
86
  export function struct(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
87
87
  export function struct(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
88
- export function pack(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
88
+ export function pack(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
89
89
  export function pack(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
90
90
  export function pack(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
91
91
 
92
- export function union(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
92
+ export function union(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
93
93
  export function union(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
94
94
  export function union(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
95
95
 
@@ -100,28 +100,34 @@ export class Union {
100
100
 
101
101
  export function array(ref: TypeSpec, len: number, hint?: ArrayHint | null): IKoffiCType;
102
102
 
103
- export function opaque(name: string): IKoffiCType;
103
+ export function opaque(name: string | null | undefined): IKoffiCType;
104
104
  export function opaque(): IKoffiCType;
105
- /** @deprecated */ export function handle(name: string): IKoffiCType;
105
+ /** @deprecated */ export function handle(name: string | null | undefined): IKoffiCType;
106
106
  /** @deprecated */ export function handle(): IKoffiCType;
107
107
 
108
108
  export function pointer(ref: TypeSpec): IKoffiCType;
109
- export function pointer(ref: TypeSpec, asteriskCount?: number): IKoffiCType;
110
- export function pointer(name: string, ref: TypeSpec, asteriskCount?: number): IKoffiCType;
109
+ export function pointer(ref: TypeSpec, count: number): IKoffiCType;
110
+ export function pointer(name: string | null | undefined, ref: TypeSpec): IKoffiCType;
111
+ export function pointer(name: string | null | undefined, ref: TypeSpec, count: number): IKoffiCType;
111
112
 
112
113
  export function out(type: TypeSpec): IKoffiCType;
113
114
  export function inout(type: TypeSpec): IKoffiCType;
114
115
 
115
116
  export function disposable(type: TypeSpec): IKoffiCType;
116
- export function disposable(name: string, type: TypeSpec): IKoffiCType;
117
- export function disposable(name: string, type: TypeSpec, freeFunction: Function): IKoffiCType;
117
+ export function disposable(type: TypeSpec, freeFunction: Function): IKoffiCType;
118
+ export function disposable(name: string | null | undefined, type: TypeSpec): IKoffiCType;
119
+ export function disposable(name: string | null | undefined, type: TypeSpec, freeFunction: Function): IKoffiCType;
118
120
 
119
121
  export function proto(definition: string): IKoffiCType;
120
- export function proto(name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
121
- export function proto(convention: string, name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
122
+ export function proto(result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
123
+ export function proto(convention: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
124
+ export function proto(name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
125
+ export function proto(convention: string, name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
122
126
  /** @deprecated */ export function callback(definition: string): IKoffiCType;
123
- /** @deprecated */ export function callback(name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
124
- /** @deprecated */ export function callback(convention: string, name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
127
+ /** @deprecated */ export function callback(result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
128
+ /** @deprecated */ export function callback(convention: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
129
+ /** @deprecated */ export function callback(name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
130
+ /** @deprecated */ export function callback(convention: string, name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
125
131
 
126
132
  export function register(callback: Function, type: TypeSpec): IKoffiRegisteredCallback;
127
133
  export function register(thisValue: any, callback: Function, type: TypeSpec): IKoffiRegisteredCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koffi-cream",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "description": "A lighter packaging for Koffi, the fast and simple C FFI (foreign function interface) for Node.js",
5
5
  "author": {
6
6
  "name": "Stephan 'Septh' Schreiber",
@@ -41,18 +41,18 @@
41
41
  "main": "index.js",
42
42
  "types": "index.d.ts",
43
43
  "optionalDependencies": {
44
- "@septh/koffi-darwin-arm64": "2.12.3",
45
- "@septh/koffi-darwin-x64": "2.12.3",
46
- "@septh/koffi-linux-arm64-glibc": "2.12.3",
47
- "@septh/koffi-linux-arm64-musl": "2.12.3",
48
- "@septh/koffi-linux-x64-glibc": "2.12.3",
49
- "@septh/koffi-linux-x64-musl": "2.12.3",
50
- "@septh/koffi-linux-loong64": "2.12.3",
51
- "@septh/koffi-linux-riscv64": "2.12.3",
52
- "@septh/koffi-win32-arm64": "2.12.3",
53
- "@septh/koffi-win32-x64": "2.12.3",
54
- "@septh/koffi-freebsd-arm64": "2.12.3",
55
- "@septh/koffi-freebsd-x64": "2.12.3",
56
- "@septh/koffi-openbsd-x64": "2.12.3"
44
+ "@septh/koffi-darwin-arm64": "2.13.0",
45
+ "@septh/koffi-darwin-x64": "2.13.0",
46
+ "@septh/koffi-freebsd-arm64": "2.13.0",
47
+ "@septh/koffi-freebsd-x64": "2.13.0",
48
+ "@septh/koffi-linux-arm64-glibc": "2.13.0",
49
+ "@septh/koffi-linux-loong64": "2.13.0",
50
+ "@septh/koffi-linux-riscv64": "2.13.0",
51
+ "@septh/koffi-linux-x64-glibc": "2.13.0",
52
+ "@septh/koffi-linux-arm64-musl": "2.13.0",
53
+ "@septh/koffi-linux-x64-musl": "2.13.0",
54
+ "@septh/koffi-openbsd-x64": "2.13.0",
55
+ "@septh/koffi-win32-arm64": "2.13.0",
56
+ "@septh/koffi-win32-x64": "2.13.0"
57
57
  }
58
58
  }