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

    Type Alias JsArgFromCType<T>

    JsArgFromCType: T extends SimpleCDataConstructor<infer Tag>
        ? JsArgFromTag<Tag>
        : T extends BitFieldDef
            ? number
            | bigint
            : T extends PointerTypeDef<infer B>
                ? PointerTo<B> | ArrayInstance | null
                : T extends FuncPtrFactory
                    ? { _as_parameter_: unknown }
                    : T extends StructDef<infer F>
                        ? StructBuffer<F> | FieldsInput<F> | ReadonlyArray<unknown>
                        : T extends ArrayTypeDef<infer E>
                            ? ArrayFieldArg<E>
                            : T extends StructureClass ? AggregateArg<T> : any

    Map a field/element type to the JavaScript input types a write accepts (struct fields, array elements, writeValue), as Python's field setters: a POINTER field takes a pointer of its type, an array of the pointee or null (no address or Buffer); a CFUNCTYPE field an instance of the prototype (not null); a nested structure an instance, a plain object of field values or a sequence of positional values (a StructDef also a create() result); an array a sequence of elements or an array instance (a c_char array: bytes or a string; a c_wchar array: a string). Function parameters are typed by JsArgFromFFIType.

    Type Parameters

    • T