@hazae41/base64
Version:
Base64 adapter for WebAssembly and JS implementations
18 lines (15 loc) • 764 B
TypeScript
import { BytesOrCopiable, Copied } from '../../libs/copiable/index.js';
import { Base64Wasm } from '@hazae41/base64.wasm';
declare function fromBufferOrWasm(wasm: typeof Base64Wasm): {
encodePaddedOrThrow: (bytes: BytesOrCopiable) => string;
decodePaddedOrThrow: (text: string) => Copied;
encodeUnpaddedOrThrow: (bytes: BytesOrCopiable) => string;
decodeUnpaddedOrThrow: (text: string) => Copied;
};
declare function fromWasm(wasm: typeof Base64Wasm): {
encodePaddedOrThrow: (bytes: BytesOrCopiable) => string;
decodePaddedOrThrow: (text: string) => Base64Wasm.Memory;
encodeUnpaddedOrThrow: (bytes: BytesOrCopiable) => string;
decodeUnpaddedOrThrow: (text: string) => Base64Wasm.Memory;
};
export { fromBufferOrWasm, fromWasm };