{
  "version": 3,
  "sources": ["../../src/codec-string/index.ts"],
  "sourcesContent": ["import { OpaqueType } from \"../opaque-type/index.js\";\n\n/**\n * Represents an object with a toString() method.\n */\nexport interface Stringifiable {\n  toString(): string;\n}\n\n/**\n * Represents an object that has been converted to a string.\n */\nexport type StringEncoded<T extends Stringifiable> = OpaqueType<string, T>;\n\n/**\n * Converts the given object to a string.\n * @param value The object to convert to a string\n * @returns The string that represents the object\n * @example\n * ```ts\n * const hugeNumberString = stringEncode(99999999n);\n * // typeof hugeNumberString = StringEncoded<bigint>\n * const hugeNumber = BigInt(hugeNumberString)\n * // typeof hugeNumber = bigint\n * ```\n */\nexport function stringEncode<T extends Stringifiable>(value: T) {\n  return value.toString() as StringEncoded<T>;\n}\n"],
  "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GA0BO,SAASE,EAAsCE,EAAU,CAC9D,OAAOA,EAAM,SAAS,CACxB",
  "names": ["codec_string_exports", "__export", "stringEncode", "__toCommonJS", "value"]
}
