JSPM

@types/level-codec

9.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6437
  • Score
    100M100P100Q126797F
  • License MIT

TypeScript definitions for level-codec

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/level-codec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/level-codec

    Summary

    This package contains type definitions for level-codec (https://github.com/Level/codec).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/level-codec.

    index.d.ts

    export interface CodecEncoder {
        encode: (val: any) => any;
        decode: (val: any) => any;
        buffer: boolean;
        type: string;
    }
    export interface CodecOptions {
        keyEncoding?: string | CodecEncoder | undefined;
        valueEncoding?: string | CodecEncoder | undefined;
    }
    export interface Codec {
        encodeKey(key: any, opts?: CodecOptions, batchOpts?: CodecOptions): any;
        encodeValue(value: any, opts?: CodecOptions, batchOpts?: CodecOptions): any;
        decodeKey(key: any, opts?: CodecOptions): any;
        decodeValue(value: any, opts?: CodecOptions): any;
        encodeBatch(ops: any, opts?: CodecOptions): any;
        encodeLtgt(ltgt: any): any;
        createStreamDecoder(opts: CodecOptions): any;
        keyAsBuffer(opts?: CodecOptions): any;
        valueAsBuffer(opts?: CodecOptions): any;
    }
    export interface CodecConstructor {
        new(options?: CodecOptions): Codec;
        (options?: CodecOptions): Codec;
    }
    
    export const Codec: CodecConstructor;
    

    Additional Details

    • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
    • Dependencies: none

    Credits

    These definitions were written by Daniel Byrne.