types.ts (1484B) - raw
1 export interface Config { 2 readonly operaDownloadButton: boolean 3 readonly bypassCameraRollLimit: boolean 4 readonly showFirstCreatedUsername: boolean 5 readonly composerLogs: boolean 6 readonly customSelfDestructSnapDelay: boolean 7 } 8 9 export interface FriendInfo { 10 readonly id: number 11 readonly lastModifiedTimestamp: number 12 readonly username: string 13 readonly userId: string 14 readonly displayName: string 15 readonly bitmojiAvatarId: string 16 readonly bitmojiSelfieId: string 17 readonly bitmojiSceneId: string 18 readonly bitmojiBackgroundId: string 19 readonly friendmojis: string 20 readonly friendmojiCategories: string 21 readonly snapScore: number 22 readonly birthday: number 23 readonly addedTimestamp: number 24 readonly reverseAddedTimestamp: number 25 readonly serverDisplayName: string 26 readonly streakLength: number 27 readonly streakExpirationTimestamp: number 28 readonly reverseBestFriendRanking: number 29 readonly isPinnedBestFriend: number 30 readonly plusBadgeVisibility: number 31 readonly usernameForSorting: string 32 readonly friendLinkType: number 33 readonly postViewEmoji: string 34 readonly businessCategory: number 35 } 36 37 export interface Module { 38 readonly name: string 39 enabled: (config: Config) => boolean 40 init: () => void 41 } 42 43 export const modules: Module[] = [] 44 45 export function defineModule<T extends Module>(module: T & Record<string, any>): T { 46 modules.push(module) 47 return module 48 }