@dvhb/react-intl-messages
Version:
Library for parsing source files and extract react-intl messages
23 lines (22 loc) • 1.09 kB
TypeScript
/// <reference types="node" />
import * as https from 'https';
import * as querystring from 'querystring';
export declare const glob: (pattern: string, ignore?: string | string[] | undefined) => Promise<string[]>;
export declare const readFile: (file: string) => Promise<string>;
export declare const writeFile: (file: string, contents: string) => Promise<void>;
export declare const posixPath: (fileName: string) => string;
export declare const toHash: <T>(array: T[], key: string) => {
[id: string]: T;
};
export declare const tail: <T>(arr: T[]) => T[];
export declare const head: <T>(arr: T[]) => T;
declare type Options = https.RequestOptions & {
url: string;
body?: object;
qs?: querystring.ParsedUrlQueryInput;
};
export declare const request: <T>({ url, body, qs, headers, ...rest }: Options) => Promise<T>;
export declare const showError: (message: string) => void;
export declare const showInfo: (message: string) => void;
export declare const asyncForEach: <T>(array: T[], callback: (item: T, index: number, array: T[]) => Promise<void>) => Promise<void>;
export {};