Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/bencodex/src/types.ts>Value

An alternative take on implementing Bencodex in TypeScript/JavaScript
Latest
type alias Value
import { type Value } from "https://deno.land/x/bencodex@0.2.2/src/types.ts";

Represents a value which can be encoded in Bencodex. Each data type in Bencodex has its corresponding type in JavaScript:

  • null represents Bencodex's null
  • boolean represents Bencodex's Boolean
  • bigint represents Bencodex's integer
  • string represents Bencodex's text
  • Uint8Array represents Bencodex's binary
  • Value[] represents Bencodex's list
  • Dictionary represents Bencodex's dictionary (note that it is not a concrete type, but an interface)
definition:
| null
| boolean
| bigint
| Key
| List