node-ctypes - v2.17.1
    Preparing search index...

    Interface TypedFFIFunction<TArgs, TRet>

    Strongly-typed FFI function returned by CDLL.func when the argument types and return type are given as a literal tuple and constant respectively.

    Args and return are narrowed from the supplied CType constructors. Falls back to the untyped FFIFunction when types cannot be inferred.

    interface TypedFFIFunction<
        TArgs extends readonly FFIType[],
        TRet extends FFIType | null,
    > {
        callAsync(...args: FFIArgs<TArgs>): Promise<FFIReturn<TRet>>;
        callOn(
            target: ExecutorTarget,
            ...args: FFIArgs<TArgs>,
        ): Promise<FFIReturn<TRet>>;
        funcName: string;
        address: bigint;
        _as_parameter_: bigint;
        restype: TRet;
        argtypes: readonly FFIType[];
        errcheck: ErrcheckCallback;
        (...args: FFIArgs<TArgs>): FFIReturn<TRet>;
    }

    Type Parameters

    Index
    funcName: string
    address: bigint
    _as_parameter_: bigint
    restype: TRet

    Return type, fixed when the function (a CDLL.func binding or a CFUNCTYPE instance) is created: assigning it throws a TypeError. Python applies the assignment; create a new instance from a prototype with the new type instead.

    argtypes: readonly FFIType[]

    Argument types, fixed at creation: assigning them throws a TypeError.