mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
remove most uses of as any in typescript
- replaced many uses of `as any` with another more specific cast `as T` - filled in missing typed for items that needed to be typed - new runtime code was added where necessary to satisfy the new types with comments - added missing theme variable "sidebar-active" to the Theme variables - forms using `react-hook-form` are now typechecked - changed some instances of `target` into `currentTarget` while removing `as any` assertions
This commit is contained in:
@@ -18,7 +18,8 @@ export default function AttachmentActions({ attachment }: Props) {
|
||||
const open_url = `${url}/${filename}`;
|
||||
const download_url = url.replace('attachments', 'attachments/download')
|
||||
|
||||
const filesize = determineFileSize(size as any);
|
||||
// for some reason revolt.js says the size is a string even though it's a number
|
||||
const filesize = determineFileSize(size as unknown as number);
|
||||
|
||||
switch (metadata.type) {
|
||||
case 'Image':
|
||||
|
||||
Reference in New Issue
Block a user