Add type annotation for some js files (#24787)
parent
9b8cb947a7
commit
e38b391940
@ -1,4 +1,4 @@
|
||||
export default function compareId (id1, id2) {
|
||||
export default function compareId (id1: string, id2: string) {
|
||||
if (id1 === id2) {
|
||||
return 0;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export const decode = base64 => {
|
||||
export const decode = (base64: string): Uint8Array => {
|
||||
const rawData = window.atob(base64);
|
||||
const outputArray = new Uint8Array(rawData.length);
|
||||
|
@ -1,4 +1,4 @@
|
||||
export const toServerSideType = columnType => {
|
||||
export const toServerSideType = (columnType: string) => {
|
||||
switch (columnType) {
|
||||
case 'home':
|
||||
case 'notifications':
|
@ -0,0 +1,7 @@
|
||||
export interface MastodonMap<T> {
|
||||
get<K extends keyof T>(key: K): T[K];
|
||||
has<K extends keyof T>(key: K): boolean;
|
||||
set<K extends keyof T>(key: K, value: T[K]): this;
|
||||
}
|
||||
|
||||
export type ValueOf<T> = T[keyof T];
|
Loading…
Reference in new issue