fix(Array, {HeadlessType})
This commit is contained in:
18
types/index.d.ts
vendored
18
types/index.d.ts
vendored
@ -28,14 +28,6 @@ export function serialize(dv: DataView, src: Serializable, ...types: Serializabl
|
||||
*/
|
||||
export function parse(dv: DataView, ...types: SerializableType[]): Serializable;
|
||||
|
||||
/**
|
||||
* some types, like Array, String, has no fixed size. So in Structure they are stored as u32 offset, which points to their beginning
|
||||
* @param {Serializable} obj to check
|
||||
* @param {SerializableType[]} ...types primary and inner types. eg: Array, Number
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isHeadless(obj: Serializable, ...types: SerializableType[]): boolean;
|
||||
|
||||
/**
|
||||
* some types, like Array, String, has no fixed size. So in Structure they are stored as u32 offset, which points to their beginning
|
||||
* @param {SerializableType[]} ...types primary and inner types. eg: Array, Number
|
||||
@ -43,14 +35,6 @@ export function isHeadless(obj: Serializable, ...types: SerializableType[]): boo
|
||||
*/
|
||||
export function isHeadless(...types: SerializableType[]): boolean;
|
||||
|
||||
/**
|
||||
* if obj has no fixed size, return 4 (sizeof u32 offset)
|
||||
* @param {Serializable} obj to check
|
||||
* @param {SerializableType[]} ...types primary and inner types. eg: Array, Number
|
||||
* @returns {number}
|
||||
*/
|
||||
export function sizeofHead(obj: Serializable, ...types: SerializableType[]): number;
|
||||
|
||||
/**
|
||||
* if obj has no fixed size, return 4 (sizeof u32 offset)
|
||||
* @param {SerializableType[]} ...types primary and inner types. eg: Array, Number
|
||||
@ -71,3 +55,5 @@ export function sizeof(obj: Serializable, ...types: SerializableType[]): number;
|
||||
* @throws {Error} if passed Array, String, DataView type (unknown sizeof)
|
||||
*/
|
||||
export function sizeof(...types: SerializableType[]): number;
|
||||
|
||||
export function isSerializableType(type: unknown): boolean;
|
||||
|
||||
Reference in New Issue
Block a user