UNPKG

gwitter

Version:

Turn GitHub Issues into your personal microblog platform

68 lines (67 loc) 1.86 kB
export declare const parseUrl: (search?: string) => Record<string, string>; export declare const throttle: (func: Function, wait: number, options?: any) => (this: unknown) => any; export declare const formatErrorMsg: (error: any) => string; export interface Label { name: string; color: string; } export interface Reaction { content: string; user: { login: string; }; } export interface RawIssue { id: string; number: number; createdAt: string; bodyHTML: string; title: string; url: string; author: { login: string; avatarUrl: string; url: string; }; reactions: { totalCount: number; nodes: Reaction[]; }; comments: { totalCount: number; }; labels: { nodes: Label[]; }; } export interface ProcessedIssue { id: string; number: number; createdAt: string; bodyHTML: string; title: string; url: string; author: { login: string; avatarUrl: string; url: string; }; reactions: { totalCount: number; userReacted: boolean; heartCount: number; }; comments: number; label: Label; } export declare const transformIssues: (rawIssues: RawIssue[], currentUser?: string) => ProcessedIssue[]; export declare const formatDate: (_date: string | Date, language?: string) => string; export declare const getColorByBgColor: (hexcolor: string) => "black" | "white"; export declare const queryStringify: (query: Record<string, string>) => string; export declare const windowOpen: (_url: string) => Promise<unknown>; export declare const processLinksInHTML: (html: string) => string; export declare const getRepoFromUrl: () => { owner: string; repo: string; } | null; export declare const updateUrlParams: (owner: string, repo: string) => void;