Skip to content

Commit

Permalink
fixed compilation error
Browse files Browse the repository at this point in the history
fixed "Argument of type 'Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'ArrayBufferLike'"
  • Loading branch information
Code-Hex committed Dec 29, 2024
1 parent 633dfbf commit 9091791
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ export const decodeBase64 = (str: string): Uint8Array => {
};

const jsonUTF8Stringify = (obj: any): Uint8Array => utf8Encoder.encode(JSON.stringify(obj));
export const encodeObjectBase64Url = (obj: any): string => encodeBase64Url(jsonUTF8Stringify(obj));
export const encodeObjectBase64Url = (obj: any): string => encodeBase64Url(jsonUTF8Stringify(obj).buffer);
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2022",
"target": "esnext",
"module": "commonjs",
"declaration": true,
"moduleResolution": "node",
Expand Down

0 comments on commit 9091791

Please sign in to comment.