diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..b177b67 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,10 @@ +export function encode(uint8array: Uint8Array): string; + +export function decode(base64: string): Uint8Array; + +declare const uint8ToBase64: { + encode: typeof encode; + decode: typeof decode; +}; + +export default uint8ToBase64; \ No newline at end of file diff --git a/package.json b/package.json index 214ce4f..084d333 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uint8-to-base64", - "version": "0.2.0", + "version": "0.2.1", "description": "A safe Uint8Array to base64 string converter", "main": "cjs/index.js", "scripts": { @@ -43,5 +43,6 @@ "bugs": { "url": "https://github.com/WebReflection/uint8-to-base64/issues" }, - "homepage": "https://github.com/WebReflection/uint8-to-base64#readme" + "homepage": "https://github.com/WebReflection/uint8-to-base64#readme", + "types": "index.d.ts" }