npm.io
1.0.5 • Published 11 months ago

@types/python-struct

Licence
MIT
Version
1.0.5
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/python-struct

Summary

This package contains type definitions for python-struct (https://github.com/danielgindi/node-python-struct).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/python-struct.

index.d.ts

/// <reference types="node" />

import Long = require("long");

export type DataType = number | Long | string | boolean;

export function pack(format: string, data: DataType[]): Buffer;
export function pack(format: string, ...data: DataType[]): Buffer;
export function sizeOf(format: string): number;
export function unpack(
    format: string,
    data: Buffer,
    checkBounds?: boolean,
): DataType[];
export function unpackFrom(
    format: string,
    data: Buffer,
    checkBounds: boolean | undefined,
    position: number,
): DataType;

Additional Details

Credits

These definitions were written by Florian Keller.