@mrhiden/cstruct
Version:
For packing and unpacking bytes (C like structures) in/from Buffer based on Object/Array type for parsing.
21 lines (20 loc) • 887 B
TypeScript
import { Model, Types } from "./types";
import { CStructBE } from "./cstruct-be";
import { CStructLE } from "./cstruct-le";
import { Constructor, CStructClassOptions, CStructPropertyOptions, Dictionary } from "./decorators-types";
export declare class CStructMetadata {
model: Model;
types: Types;
cStruct: CStructBE<any> | CStructLE<any>;
class: Constructor<any>;
className: string;
static CStructSymbol: symbol;
constructor();
static getMetadata(target: any): any;
static addProperty<T>(target: T & Dictionary, propertyName: string, options: CStructPropertyOptions): void;
static addClass<T>(target: T & Dictionary, options: CStructClassOptions): void;
static getCStructBE<T>(struct: T): CStructBE<T>;
static getCStructLE<T>(struct: T): CStructLE<T>;
static getModel<T>(struct: T): Model;
static getTypes<T>(struct: T): Types;
}