node-ffi-rs
Advanced tools
Comparing version 1.0.63 to 1.0.64
@@ -16,2 +16,3 @@ export const enum DataType { | ||
FloatArray = 13, | ||
Float = 14, | ||
} | ||
@@ -91,3 +92,3 @@ | ||
type ResultWithErrno<T, IncludeErrno extends boolean | undefined> = IncludeErrno extends true | ||
type ResultWithErrno<T, IncludeErrno extends boolean | undefined = undefined> = IncludeErrno extends true | ||
? { value: T; errnoCode: number; errnoMessage: string } | ||
@@ -114,3 +115,3 @@ : T; | ||
export type FFIParams<T extends FieldType, U extends boolean | undefined> = { | ||
export type FFIParams<T extends FieldType, U extends boolean | undefined = undefined> = { | ||
library: string; | ||
@@ -124,3 +125,3 @@ funcName: string; | ||
} | ||
export function load<T extends FieldType, U extends boolean | undefined>( | ||
export function load<T extends FieldType, U extends boolean | undefined = undefined>( | ||
params: FFIParams<T, U>, | ||
@@ -131,3 +132,3 @@ ): ResultWithErrno<FieldTypeToType<T>, U> | ||
T extends FieldType, | ||
U extends boolean | undefined | ||
U extends boolean | undefined = undefined | ||
> = Record<string, Omit<FFIParams<T, U>, 'paramsValue' | 'funcName'>> | ||
@@ -134,0 +135,0 @@ |
{ | ||
"name": "node-ffi-rs", | ||
"version": "1.0.63", | ||
"version": "1.0.64", | ||
"main": "index.js", | ||
@@ -60,11 +60,11 @@ "types": "index.d.ts", | ||
"optionalDependencies": { | ||
"@yuuang/ffi-rs-win32-x64-msvc": "1.0.63", | ||
"@yuuang/ffi-rs-darwin-x64": "1.0.63", | ||
"@yuuang/ffi-rs-linux-x64-gnu": "1.0.63", | ||
"@yuuang/ffi-rs-darwin-arm64": "1.0.63", | ||
"@yuuang/ffi-rs-linux-arm64-gnu": "1.0.63", | ||
"@yuuang/ffi-rs-linux-arm64-musl": "1.0.63", | ||
"@yuuang/ffi-rs-win32-ia32-msvc": "1.0.63", | ||
"@yuuang/ffi-rs-linux-x64-musl": "1.0.63" | ||
"@yuuang/ffi-rs-win32-x64-msvc": "1.0.64", | ||
"@yuuang/ffi-rs-darwin-x64": "1.0.64", | ||
"@yuuang/ffi-rs-linux-x64-gnu": "1.0.64", | ||
"@yuuang/ffi-rs-darwin-arm64": "1.0.64", | ||
"@yuuang/ffi-rs-linux-arm64-gnu": "1.0.64", | ||
"@yuuang/ffi-rs-linux-arm64-musl": "1.0.64", | ||
"@yuuang/ffi-rs-win32-ia32-msvc": "1.0.64", | ||
"@yuuang/ffi-rs-linux-x64-musl": "1.0.64" | ||
} | ||
} |
@@ -63,3 +63,4 @@ # ffi-rs | ||
- [u64](#basic-types) | ||
- [void](#basic-types)(undefined) | ||
- [void](#basic-types)(like js undefined) | ||
- [float](#basic-types)(can only be used as paramsType instead of retType) | ||
- [double](#basic-types) | ||
@@ -75,3 +76,3 @@ - [boolean](#basic-types) | ||
- [doubleArray](#array) | ||
- [floatArray](#array) | ||
- [floatArray](#array)(can only be used as paramsType instead of retType) | ||
- [object](#struct)(Nested object is also supported at the latest version) | ||
@@ -78,0 +79,0 @@ - [function](#function) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33906
445
684