@hazae41/binary
Advanced tools
Comparing version 1.2.15 to 1.2.17
import { Bytes, Sized } from '@hazae41/bytes'; | ||
import { Cursor, CursorWriteOverflowError, CursorReadOverflowError } from '@hazae41/cursor'; | ||
import { Cursor, CursorWriteLengthOverflowError, CursorReadLengthOverflowError } from '@hazae41/cursor'; | ||
import { Result } from '@hazae41/result'; | ||
@@ -14,2 +14,3 @@ import { Readable } from './readable.js'; | ||
constructor(bytes: T); | ||
static new<T extends Bytes>(bytes: T): Opaque<T>; | ||
static empty(): Opaque<Bytes<0>>; | ||
@@ -22,3 +23,3 @@ static alloc<N extends number>(length: N): Opaque<Bytes<N>>; | ||
trySize(): Result<number, never>; | ||
tryWrite(cursor: Cursor): Result<void, CursorWriteOverflowError>; | ||
tryWrite(cursor: Cursor): Result<void, CursorWriteLengthOverflowError>; | ||
/** | ||
@@ -41,3 +42,3 @@ * Transform this opaque into a binary data type | ||
declare namespace UnsafeOpaque { | ||
function tryRead(cursor: Cursor): Result<Opaque, CursorReadOverflowError>; | ||
function tryRead(cursor: Cursor): Result<Opaque, CursorReadLengthOverflowError>; | ||
} | ||
@@ -48,5 +49,5 @@ /** | ||
declare namespace SafeOpaque { | ||
function tryRead(cursor: Cursor): Result<Opaque, CursorReadOverflowError>; | ||
function tryRead(cursor: Cursor): Result<Opaque, CursorReadLengthOverflowError>; | ||
} | ||
export { Opaque, SafeOpaque, UnsafeOpaque }; |
{ | ||
"type": "module", | ||
"name": "@hazae41/binary", | ||
"version": "1.2.15", | ||
"version": "1.2.17", | ||
"description": "Zero-copy binary data types", | ||
@@ -26,3 +26,3 @@ "homepage": "https://github.com/hazae41/binary", | ||
"@hazae41/bytes": "^1.1.5", | ||
"@hazae41/cursor": "^1.1.5", | ||
"@hazae41/cursor": "^1.1.6", | ||
"@hazae41/result": "^1.0.12" | ||
@@ -29,0 +29,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42676
584
Updated@hazae41/cursor@^1.1.6