Add type annotation for some js files (#24787)
This commit is contained in:
parent
9b8cb947a7
commit
e38b391940
11 changed files with 36 additions and 49 deletions
10
app/javascript/mastodon/utils/base64.ts
Normal file
10
app/javascript/mastodon/utils/base64.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export const decode = (base64: string): Uint8Array => {
|
||||
const rawData = window.atob(base64);
|
||||
const outputArray = new Uint8Array(rawData.length);
|
||||
|
||||
for (let i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
|
||||
return outputArray;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue