UNPKG

@cerbos/embedded

Version:

Client library for interacting with embedded Cerbos policy decision points generated by Cerbos Hub from server-side Node.js and browser-based applications

18 lines 615 B
export interface Allocator { memory: WebAssembly.Memory; allocate: (length: number) => bigint; deallocate: (offset: number, length: number) => void; } export declare class Slice { readonly offset: number; readonly length: number; static from(allocator: Allocator, offsetAndLength: bigint): Slice; static ofJSON(allocator: Allocator, data: unknown): Slice; static ofString(allocator: Allocator, data: string): Slice; readonly deallocate: () => void; private readonly bytes; private constructor(); text(): string; private copy; } //# sourceMappingURL=slice.d.ts.map