low-level
Version:
22 lines • 957 B
TypeScript
import type { Uint } from "./uint.js";
export type WithString = {
[Symbol.toPrimitive](hint: "string"): string;
} | WithImplicitCoercion<string>;
export type WithArrayBuffer = WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>;
export type ByteArray = readonly number[] | Uint8Array;
export type NumberLike = Uint | number;
export type BinLike = Uint | Buffer;
export type New<T> = new (input: BinLike) => T;
export declare class UintUtils {
static fixBufferByteLength(buffer: Buffer, correctByteLength: number): Buffer;
static fixUintByteLength<T>(CLS: New<T>, uint: Uint, correctByteLength: number): T;
}
export declare abstract class AbstractIterator<T, M> implements IterableIterator<T> {
protected entries: IterableIterator<M>;
constructor(entries: IterableIterator<M>);
[Symbol.iterator](): this;
next(): IteratorResult<T>;
protected abstract _next(value: M): T;
all(): T[];
}
//# sourceMappingURL=utils.d.ts.map