🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@types/ffi

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ffi - npm Package Compare versions

Comparing version
0.2.4
to
0.2.5
+39
-23
ffi/index.d.ts

@@ -9,6 +9,5 @@ // Type definitions for node-ffi 0.2

import ref = require("ref");
import StructType = require("ref-struct");
import ref = require('ref');
import StructType = require('ref-struct');
/** Provides a friendly API on-top of `DynamicLibrary` and `ForeignFunction`. */

@@ -24,3 +23,3 @@ export interface Library {

*/
new (libFile: string, funcs?: {[key: string]: any[]}, lib?: object): any;
new(libFile: string, funcs?: { [key: string]: any[] }, lib?: object): any;

@@ -32,3 +31,3 @@ /**

*/
(libFile: string, funcs?: {[key: string]: any[]}, lib?: object): any;
(libFile: string, funcs?: { [key: string]: any[] }, lib?: object): any;
}

@@ -57,3 +56,3 @@ export const Library: Library;

export const Function: {
new (retType: ref.Type | string, argTypes: any[], abi?: number): Function;
new(retType: ref.Type | string, argTypes: any[], abi?: number): Function;
(retType: ref.Type | string, argTypes: any[], abi?: number): Function;

@@ -74,3 +73,3 @@ };

export const ForeignFunction: {
new (ptr: Buffer, retType: ref.Type | string, argTypes: any[], abi?: number): ForeignFunction;
new(ptr: Buffer, retType: ref.Type | string, argTypes: any[], abi?: number): ForeignFunction;
(ptr: Buffer, retType: ref.Type | string, argTypes: any[], abi?: number): ForeignFunction;

@@ -102,3 +101,3 @@ };

export const VariadicForeignFunction: {
new (ptr: Buffer, ret: ref.Type | string, fixedArgs: any[], abi?: number): VariadicForeignFunction;
new(ptr: Buffer, ret: ref.Type | string, fixedArgs: any[], abi?: number): VariadicForeignFunction;
(ptr: Buffer, ret: ref.Type | string, fixedArgs: any[], abi?: number): VariadicForeignFunction;

@@ -133,5 +132,5 @@ };

RTLD_DEFAUL: Buffer;
}
};
new (path?: string, mode?: number): DynamicLibrary;
new(path?: string, mode?: number): DynamicLibrary;
(path?: string, mode?: number): DynamicLibrary;

@@ -146,4 +145,4 @@ };

export interface Callback {
new (retType: any, argTypes: any[], abi: number, fn: any): Buffer;
new (retType: any, argTypes: any[], fn: any): Buffer;
new(retType: any, argTypes: any[], abi: number, fn: any): Buffer;
new(retType: any, argTypes: any[], fn: any): Buffer;
(retType: any, argTypes: any[], abi: number, fn: any): Buffer;

@@ -156,3 +155,3 @@ (retType: any, argTypes: any[], fn: any): Buffer;

/** Get a `ffi_type *` Buffer appropriate for the given type. */
(type: ref.Type | string): Buffer
(type: ref.Type | string): Buffer;
FFI_TYPE: StructType;

@@ -164,3 +163,3 @@ };

export const HAS_OBJC: boolean;
export const FFI_TYPES: {[key: string]: Buffer};
export const FFI_TYPES: { [key: string]: Buffer };
export const FFI_OK: number;

@@ -192,11 +191,28 @@ export const FFI_BAD_TYPEDEF: number;

export const types: {
void: ref.Type; int64: ref.Type; ushort: ref.Type;
int: ref.Type; uint64: ref.Type; float: ref.Type;
uint: ref.Type; long: ref.Type; double: ref.Type;
int8: ref.Type; ulong: ref.Type; Object: ref.Type;
uint8: ref.Type; longlong: ref.Type; CString: ref.Type;
int16: ref.Type; ulonglong: ref.Type; bool: ref.Type;
uint16: ref.Type; char: ref.Type; byte: ref.Type;
int32: ref.Type; uchar: ref.Type; size_t: ref.Type;
uint32: ref.Type; short: ref.Type;
void: ref.Type;
int64: ref.Type;
ushort: ref.Type;
int: ref.Type;
uint64: ref.Type;
float: ref.Type;
uint: ref.Type;
long: ref.Type;
double: ref.Type;
int8: ref.Type;
ulong: ref.Type;
Object: ref.Type;
uint8: ref.Type;
longlong: ref.Type;
CString: ref.Type;
int16: ref.Type;
ulonglong: ref.Type;
bool: ref.Type;
uint16: ref.Type;
char: ref.Type;
byte: ref.Type;
int32: ref.Type;
uchar: ref.Type;
size_t: ref.Type;
uint32: ref.Type;
short: ref.Type;
};
{
"name": "@types/ffi",
"version": "0.2.4",
"version": "0.2.5",
"description": "TypeScript definitions for node-ffi",

@@ -32,4 +32,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ffi",

},
"typesPublisherContentHash": "f4e0bbd1d4e1142f5b271fa7137f86039a611cb1adaed20c9bd4ae4eb3035d9d",
"typeScriptVersion": "3.8"
"typesPublisherContentHash": "13c5f3b46bca81fbccf175f5d0c0671d85a72383209c51fcfcb816c49d7f9075",
"typeScriptVersion": "4.5"
}

@@ -11,4 +11,4 @@ # Installation

### Additional Details
* Last updated: Thu, 16 Dec 2021 22:31:55 GMT
* Dependencies: [@types/ref](https://npmjs.com/package/@types/ref), [@types/ref-struct](https://npmjs.com/package/@types/ref-struct), [@types/node](https://npmjs.com/package/@types/node)
* Last updated: Thu, 14 Sep 2023 15:26:41 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/ref](https://npmjs.com/package/@types/ref), [@types/ref-struct](https://npmjs.com/package/@types/ref-struct)
* Global values: none

@@ -15,0 +15,0 @@