mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Change prettier rules
This commit is contained in:
392
@types/chalk.d.ts
vendored
392
@types/chalk.d.ts
vendored
@@ -4,141 +4,141 @@
|
||||
*/
|
||||
|
||||
declare module 'chalk' {
|
||||
const enum LevelEnum {
|
||||
/**
|
||||
const enum LevelEnum {
|
||||
/**
|
||||
All colors disabled.
|
||||
*/
|
||||
None = 0,
|
||||
None = 0,
|
||||
|
||||
/**
|
||||
/**
|
||||
Basic 16 colors support.
|
||||
*/
|
||||
Basic = 1,
|
||||
Basic = 1,
|
||||
|
||||
/**
|
||||
/**
|
||||
ANSI 256 colors support.
|
||||
*/
|
||||
Ansi256 = 2,
|
||||
Ansi256 = 2,
|
||||
|
||||
/**
|
||||
/**
|
||||
Truecolor 16 million colors support.
|
||||
*/
|
||||
TrueColor = 3,
|
||||
}
|
||||
TrueColor = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Basic foreground colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
type ForegroundColor =
|
||||
| 'black'
|
||||
| 'red'
|
||||
| 'green'
|
||||
| 'yellow'
|
||||
| 'blue'
|
||||
| 'magenta'
|
||||
| 'cyan'
|
||||
| 'white'
|
||||
| 'gray'
|
||||
| 'grey'
|
||||
| 'blackBright'
|
||||
| 'redBright'
|
||||
| 'greenBright'
|
||||
| 'yellowBright'
|
||||
| 'blueBright'
|
||||
| 'magentaBright'
|
||||
| 'cyanBright'
|
||||
| 'whiteBright';
|
||||
type ForegroundColor =
|
||||
| 'black'
|
||||
| 'red'
|
||||
| 'green'
|
||||
| 'yellow'
|
||||
| 'blue'
|
||||
| 'magenta'
|
||||
| 'cyan'
|
||||
| 'white'
|
||||
| 'gray'
|
||||
| 'grey'
|
||||
| 'blackBright'
|
||||
| 'redBright'
|
||||
| 'greenBright'
|
||||
| 'yellowBright'
|
||||
| 'blueBright'
|
||||
| 'magentaBright'
|
||||
| 'cyanBright'
|
||||
| 'whiteBright';
|
||||
|
||||
/**
|
||||
/**
|
||||
Basic background colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
type BackgroundColor =
|
||||
| 'bgBlack'
|
||||
| 'bgRed'
|
||||
| 'bgGreen'
|
||||
| 'bgYellow'
|
||||
| 'bgBlue'
|
||||
| 'bgMagenta'
|
||||
| 'bgCyan'
|
||||
| 'bgWhite'
|
||||
| 'bgGray'
|
||||
| 'bgGrey'
|
||||
| 'bgBlackBright'
|
||||
| 'bgRedBright'
|
||||
| 'bgGreenBright'
|
||||
| 'bgYellowBright'
|
||||
| 'bgBlueBright'
|
||||
| 'bgMagentaBright'
|
||||
| 'bgCyanBright'
|
||||
| 'bgWhiteBright';
|
||||
type BackgroundColor =
|
||||
| 'bgBlack'
|
||||
| 'bgRed'
|
||||
| 'bgGreen'
|
||||
| 'bgYellow'
|
||||
| 'bgBlue'
|
||||
| 'bgMagenta'
|
||||
| 'bgCyan'
|
||||
| 'bgWhite'
|
||||
| 'bgGray'
|
||||
| 'bgGrey'
|
||||
| 'bgBlackBright'
|
||||
| 'bgRedBright'
|
||||
| 'bgGreenBright'
|
||||
| 'bgYellowBright'
|
||||
| 'bgBlueBright'
|
||||
| 'bgMagentaBright'
|
||||
| 'bgCyanBright'
|
||||
| 'bgWhiteBright';
|
||||
|
||||
/**
|
||||
/**
|
||||
Basic colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
type Color = ForegroundColor | BackgroundColor;
|
||||
type Color = ForegroundColor | BackgroundColor;
|
||||
|
||||
type Modifiers =
|
||||
| 'reset'
|
||||
| 'bold'
|
||||
| 'dim'
|
||||
| 'italic'
|
||||
| 'underline'
|
||||
| 'inverse'
|
||||
| 'hidden'
|
||||
| 'strikethrough'
|
||||
| 'visible';
|
||||
type Modifiers =
|
||||
| 'reset'
|
||||
| 'bold'
|
||||
| 'dim'
|
||||
| 'italic'
|
||||
| 'underline'
|
||||
| 'inverse'
|
||||
| 'hidden'
|
||||
| 'strikethrough'
|
||||
| 'visible';
|
||||
|
||||
namespace chalk {
|
||||
type Level = LevelEnum;
|
||||
namespace chalk {
|
||||
type Level = LevelEnum;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
interface Options {
|
||||
/**
|
||||
Specify the color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level?: Level;
|
||||
}
|
||||
level?: Level;
|
||||
}
|
||||
|
||||
interface Instance {
|
||||
/**
|
||||
interface Instance {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
new (options?: Options): Chalk;
|
||||
}
|
||||
new (options?: Options): Chalk;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Detect whether the terminal supports color.
|
||||
*/
|
||||
interface ColorSupport {
|
||||
/**
|
||||
interface ColorSupport {
|
||||
/**
|
||||
The color level used by Chalk.
|
||||
*/
|
||||
level: Level;
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
/**
|
||||
Return whether Chalk supports basic 16 colors.
|
||||
*/
|
||||
hasBasic: boolean;
|
||||
hasBasic: boolean;
|
||||
|
||||
/**
|
||||
/**
|
||||
Return whether Chalk supports ANSI 256 colors.
|
||||
*/
|
||||
has256: boolean;
|
||||
has256: boolean;
|
||||
|
||||
/**
|
||||
/**
|
||||
Return whether Chalk supports Truecolor 16 million colors.
|
||||
*/
|
||||
has16m: boolean;
|
||||
}
|
||||
has16m: boolean;
|
||||
}
|
||||
|
||||
interface ChalkFunction {
|
||||
/**
|
||||
interface ChalkFunction {
|
||||
/**
|
||||
Use a template string.
|
||||
|
||||
@remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
|
||||
@@ -154,24 +154,24 @@ declare module 'chalk' {
|
||||
`);
|
||||
```
|
||||
*/
|
||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||
|
||||
(...text: unknown[]): string;
|
||||
}
|
||||
(...text: unknown[]): string;
|
||||
}
|
||||
|
||||
interface Chalk extends ChalkFunction {
|
||||
/**
|
||||
interface Chalk extends ChalkFunction {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
Instance: Instance;
|
||||
Instance: Instance;
|
||||
|
||||
/**
|
||||
/**
|
||||
The color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level: Level;
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HEX value to set text color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
@@ -183,9 +183,9 @@ declare module 'chalk' {
|
||||
chalk.hex('#DEADED');
|
||||
```
|
||||
*/
|
||||
hex(color: string): Chalk;
|
||||
hex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use keyword color value to set text color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
@@ -197,42 +197,42 @@ declare module 'chalk' {
|
||||
chalk.keyword('orange');
|
||||
```
|
||||
*/
|
||||
keyword(color: string): Chalk;
|
||||
keyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use RGB values to set text color.
|
||||
*/
|
||||
rgb(red: number, green: number, blue: number): Chalk;
|
||||
rgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HSL values to set text color.
|
||||
*/
|
||||
hsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
hsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HSV values to set text color.
|
||||
*/
|
||||
hsv(hue: number, saturation: number, value: number): Chalk;
|
||||
hsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HWB values to set text color.
|
||||
*/
|
||||
hwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
hwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
*/
|
||||
ansi(code: number): Chalk;
|
||||
ansi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
|
||||
*/
|
||||
ansi256(index: number): Chalk;
|
||||
ansi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HEX value to set background color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
@@ -244,9 +244,9 @@ declare module 'chalk' {
|
||||
chalk.bgHex('#DEADED');
|
||||
```
|
||||
*/
|
||||
bgHex(color: string): Chalk;
|
||||
bgHex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use keyword color value to set background color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
@@ -258,162 +258,162 @@ declare module 'chalk' {
|
||||
chalk.bgKeyword('orange');
|
||||
```
|
||||
*/
|
||||
bgKeyword(color: string): Chalk;
|
||||
bgKeyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use RGB values to set background color.
|
||||
*/
|
||||
bgRgb(red: number, green: number, blue: number): Chalk;
|
||||
bgRgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HSL values to set background color.
|
||||
*/
|
||||
bgHsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
bgHsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HSV values to set background color.
|
||||
*/
|
||||
bgHsv(hue: number, saturation: number, value: number): Chalk;
|
||||
bgHsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use HWB values to set background color.
|
||||
*/
|
||||
bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
Use the foreground code, not the background code (for example, not 41, nor 101).
|
||||
*/
|
||||
bgAnsi(code: number): Chalk;
|
||||
bgAnsi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
|
||||
*/
|
||||
bgAnsi256(index: number): Chalk;
|
||||
bgAnsi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Resets the current color chain.
|
||||
*/
|
||||
readonly reset: Chalk;
|
||||
readonly reset: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Make text bold.
|
||||
*/
|
||||
readonly bold: Chalk;
|
||||
readonly bold: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Emitting only a small amount of light.
|
||||
*/
|
||||
readonly dim: Chalk;
|
||||
readonly dim: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Make text italic. (Not widely supported)
|
||||
*/
|
||||
readonly italic: Chalk;
|
||||
readonly italic: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Make text underline. (Not widely supported)
|
||||
*/
|
||||
readonly underline: Chalk;
|
||||
readonly underline: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Inverse background and foreground colors.
|
||||
*/
|
||||
readonly inverse: Chalk;
|
||||
readonly inverse: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Prints the text, but makes it invisible.
|
||||
*/
|
||||
readonly hidden: Chalk;
|
||||
readonly hidden: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
|
||||
*/
|
||||
readonly strikethrough: Chalk;
|
||||
readonly strikethrough: Chalk;
|
||||
|
||||
/**
|
||||
/**
|
||||
Modifier: Prints the text only when Chalk has a color support level > 0.
|
||||
Can be useful for things that are purely cosmetic.
|
||||
*/
|
||||
readonly visible: Chalk;
|
||||
readonly visible: Chalk;
|
||||
|
||||
readonly black: Chalk;
|
||||
readonly red: Chalk;
|
||||
readonly green: Chalk;
|
||||
readonly yellow: Chalk;
|
||||
readonly blue: Chalk;
|
||||
readonly magenta: Chalk;
|
||||
readonly cyan: Chalk;
|
||||
readonly white: Chalk;
|
||||
readonly black: Chalk;
|
||||
readonly red: Chalk;
|
||||
readonly green: Chalk;
|
||||
readonly yellow: Chalk;
|
||||
readonly blue: Chalk;
|
||||
readonly magenta: Chalk;
|
||||
readonly cyan: Chalk;
|
||||
readonly white: Chalk;
|
||||
|
||||
/*
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly gray: Chalk;
|
||||
readonly gray: Chalk;
|
||||
|
||||
/*
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly grey: Chalk;
|
||||
readonly grey: Chalk;
|
||||
|
||||
readonly blackBright: Chalk;
|
||||
readonly redBright: Chalk;
|
||||
readonly greenBright: Chalk;
|
||||
readonly yellowBright: Chalk;
|
||||
readonly blueBright: Chalk;
|
||||
readonly magentaBright: Chalk;
|
||||
readonly cyanBright: Chalk;
|
||||
readonly whiteBright: Chalk;
|
||||
readonly blackBright: Chalk;
|
||||
readonly redBright: Chalk;
|
||||
readonly greenBright: Chalk;
|
||||
readonly yellowBright: Chalk;
|
||||
readonly blueBright: Chalk;
|
||||
readonly magentaBright: Chalk;
|
||||
readonly cyanBright: Chalk;
|
||||
readonly whiteBright: Chalk;
|
||||
|
||||
readonly bgBlack: Chalk;
|
||||
readonly bgRed: Chalk;
|
||||
readonly bgGreen: Chalk;
|
||||
readonly bgYellow: Chalk;
|
||||
readonly bgBlue: Chalk;
|
||||
readonly bgMagenta: Chalk;
|
||||
readonly bgCyan: Chalk;
|
||||
readonly bgWhite: Chalk;
|
||||
readonly bgBlack: Chalk;
|
||||
readonly bgRed: Chalk;
|
||||
readonly bgGreen: Chalk;
|
||||
readonly bgYellow: Chalk;
|
||||
readonly bgBlue: Chalk;
|
||||
readonly bgMagenta: Chalk;
|
||||
readonly bgCyan: Chalk;
|
||||
readonly bgWhite: Chalk;
|
||||
|
||||
/*
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGray: Chalk;
|
||||
readonly bgGray: Chalk;
|
||||
|
||||
/*
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGrey: Chalk;
|
||||
readonly bgGrey: Chalk;
|
||||
|
||||
readonly bgBlackBright: Chalk;
|
||||
readonly bgRedBright: Chalk;
|
||||
readonly bgGreenBright: Chalk;
|
||||
readonly bgYellowBright: Chalk;
|
||||
readonly bgBlueBright: Chalk;
|
||||
readonly bgMagentaBright: Chalk;
|
||||
readonly bgCyanBright: Chalk;
|
||||
readonly bgWhiteBright: Chalk;
|
||||
readonly bgBlackBright: Chalk;
|
||||
readonly bgRedBright: Chalk;
|
||||
readonly bgGreenBright: Chalk;
|
||||
readonly bgYellowBright: Chalk;
|
||||
readonly bgBlueBright: Chalk;
|
||||
readonly bgMagentaBright: Chalk;
|
||||
readonly bgCyanBright: Chalk;
|
||||
readonly bgWhiteBright: Chalk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Main Chalk object that allows to chain styles together.
|
||||
Call the last one as a method with a string argument.
|
||||
Order doesn't matter, and later styles take precedent in case of a conflict.
|
||||
This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
*/
|
||||
const chalk: chalk.Chalk &
|
||||
chalk.ChalkFunction & {
|
||||
supportsColor: chalk.ColorSupport | false;
|
||||
Level: LevelEnum;
|
||||
Color: Color;
|
||||
ForegroundColor: ForegroundColor;
|
||||
BackgroundColor: BackgroundColor;
|
||||
Modifiers: Modifiers;
|
||||
stderr: chalk.Chalk & { supportsColor: chalk.ColorSupport | false };
|
||||
};
|
||||
const chalk: chalk.Chalk &
|
||||
chalk.ChalkFunction & {
|
||||
supportsColor: chalk.ColorSupport | false;
|
||||
Level: LevelEnum;
|
||||
Color: Color;
|
||||
ForegroundColor: ForegroundColor;
|
||||
BackgroundColor: BackgroundColor;
|
||||
Modifiers: Modifiers;
|
||||
stderr: chalk.Chalk & { supportsColor: chalk.ColorSupport | false };
|
||||
};
|
||||
|
||||
export = chalk;
|
||||
export = chalk;
|
||||
}
|
||||
|
186
@types/cwordin-api.d.ts
vendored
186
@types/cwordin-api.d.ts
vendored
@@ -1,102 +1,98 @@
|
||||
declare module 'crowdin-api' {
|
||||
export interface ProjectInfoFile {
|
||||
node_type: 'file';
|
||||
id: number;
|
||||
name: string;
|
||||
created: string;
|
||||
last_updated: string;
|
||||
last_accessed: string;
|
||||
last_revision: string;
|
||||
}
|
||||
|
||||
export interface ProjectInfoDirectory {
|
||||
node_type: 'directory';
|
||||
id: number;
|
||||
name: string;
|
||||
files: Array<ProjectInfoFile | ProjectInfoDirectory>;
|
||||
}
|
||||
|
||||
export interface ProjectInfoResponse {
|
||||
details: {
|
||||
source_language: {
|
||||
export interface ProjectInfoFile {
|
||||
node_type: 'file';
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
};
|
||||
name: string;
|
||||
identifier: string;
|
||||
created: string;
|
||||
description: string;
|
||||
join_policy: string;
|
||||
last_build: string | null;
|
||||
last_activity: string;
|
||||
participants_count: string; // it's number, but string in the response
|
||||
logo_url: string | null;
|
||||
total_strings_count: string; // it's number, but string in the response
|
||||
total_words_count: string; // it's number, but string in the response
|
||||
duplicate_strings_count: number;
|
||||
duplicate_words_count: number;
|
||||
invite_url: {
|
||||
translator: string;
|
||||
proofreader: string;
|
||||
};
|
||||
};
|
||||
languages: Array<{
|
||||
name: string; // English language name
|
||||
code: string;
|
||||
can_translate: 0 | 1;
|
||||
can_approve: 0 | 1;
|
||||
}>;
|
||||
files: Array<ProjectInfoFile | ProjectInfoDirectory>;
|
||||
}
|
||||
created: string;
|
||||
last_updated: string;
|
||||
last_accessed: string;
|
||||
last_revision: string;
|
||||
}
|
||||
|
||||
export interface LanguageStatusNode {
|
||||
node_type: 'directory' | 'file';
|
||||
id: number;
|
||||
name: string;
|
||||
phrases: number;
|
||||
translated: number;
|
||||
approved: number;
|
||||
words: number;
|
||||
words_translated: number;
|
||||
words_approved: number;
|
||||
files: Array<LanguageStatusNode>;
|
||||
}
|
||||
export interface ProjectInfoDirectory {
|
||||
node_type: 'directory';
|
||||
id: number;
|
||||
name: string;
|
||||
files: Array<ProjectInfoFile | ProjectInfoDirectory>;
|
||||
}
|
||||
|
||||
export interface LanguageStatusResponse {
|
||||
files: Array<LanguageStatusNode>;
|
||||
}
|
||||
export interface ProjectInfoResponse {
|
||||
details: {
|
||||
source_language: {
|
||||
name: string;
|
||||
code: string;
|
||||
};
|
||||
name: string;
|
||||
identifier: string;
|
||||
created: string;
|
||||
description: string;
|
||||
join_policy: string;
|
||||
last_build: string | null;
|
||||
last_activity: string;
|
||||
participants_count: string; // it's number, but string in the response
|
||||
logo_url: string | null;
|
||||
total_strings_count: string; // it's number, but string in the response
|
||||
total_words_count: string; // it's number, but string in the response
|
||||
duplicate_strings_count: number;
|
||||
duplicate_words_count: number;
|
||||
invite_url: {
|
||||
translator: string;
|
||||
proofreader: string;
|
||||
};
|
||||
};
|
||||
languages: Array<{
|
||||
name: string; // English language name
|
||||
code: string;
|
||||
can_translate: 0 | 1;
|
||||
can_approve: 0 | 1;
|
||||
}>;
|
||||
files: Array<ProjectInfoFile | ProjectInfoDirectory>;
|
||||
}
|
||||
|
||||
type FilesList = Record<string, string | ReadableStream>;
|
||||
export interface LanguageStatusNode {
|
||||
node_type: 'directory' | 'file';
|
||||
id: number;
|
||||
name: string;
|
||||
phrases: number;
|
||||
translated: number;
|
||||
approved: number;
|
||||
words: number;
|
||||
words_translated: number;
|
||||
words_approved: number;
|
||||
files: Array<LanguageStatusNode>;
|
||||
}
|
||||
|
||||
export default class CrowdinApi {
|
||||
constructor(params: {
|
||||
apiKey: string;
|
||||
projectName: string;
|
||||
baseUrl?: string;
|
||||
});
|
||||
projectInfo(): Promise<ProjectInfoResponse>;
|
||||
languageStatus(language: string): Promise<LanguageStatusResponse>;
|
||||
exportFile(
|
||||
file: string,
|
||||
language: string,
|
||||
params?: {
|
||||
branch?: string;
|
||||
format?: 'xliff';
|
||||
export_translated_only?: boolean;
|
||||
export_approved_only?: boolean;
|
||||
},
|
||||
): Promise<string>; // TODO: not sure about Promise return type
|
||||
updateFile(
|
||||
files: FilesList,
|
||||
params: {
|
||||
titles?: Record<string, string>;
|
||||
export_patterns?: Record<string, string>;
|
||||
new_names?: Record<string, string>;
|
||||
first_line_contains_header?: string;
|
||||
scheme?: string;
|
||||
update_option?: 'update_as_unapproved' | 'update_without_changes';
|
||||
branch?: string;
|
||||
},
|
||||
): Promise<void>;
|
||||
}
|
||||
export interface LanguageStatusResponse {
|
||||
files: Array<LanguageStatusNode>;
|
||||
}
|
||||
|
||||
type FilesList = Record<string, string | ReadableStream>;
|
||||
|
||||
export default class CrowdinApi {
|
||||
constructor(params: { apiKey: string; projectName: string; baseUrl?: string });
|
||||
projectInfo(): Promise<ProjectInfoResponse>;
|
||||
languageStatus(language: string): Promise<LanguageStatusResponse>;
|
||||
exportFile(
|
||||
file: string,
|
||||
language: string,
|
||||
params?: {
|
||||
branch?: string;
|
||||
format?: 'xliff';
|
||||
export_translated_only?: boolean;
|
||||
export_approved_only?: boolean;
|
||||
},
|
||||
): Promise<string>; // TODO: not sure about Promise return type
|
||||
updateFile(
|
||||
files: FilesList,
|
||||
params: {
|
||||
titles?: Record<string, string>;
|
||||
export_patterns?: Record<string, string>;
|
||||
new_names?: Record<string, string>;
|
||||
first_line_contains_header?: string;
|
||||
scheme?: string;
|
||||
update_option?: 'update_as_unapproved' | 'update_without_changes';
|
||||
branch?: string;
|
||||
},
|
||||
): Promise<void>;
|
||||
}
|
||||
}
|
||||
|
19
@types/multi-progress.d.ts
vendored
19
@types/multi-progress.d.ts
vendored
@@ -1,13 +1,10 @@
|
||||
declare module 'multi-progress' {
|
||||
export default class MultiProgress {
|
||||
constructor(stream?: string);
|
||||
newBar(
|
||||
schema: string,
|
||||
options: ProgressBar.ProgressBarOptions,
|
||||
): ProgressBar;
|
||||
terminate(): void;
|
||||
move(index: number): void;
|
||||
tick(index: number, value?: number, options?: any): void;
|
||||
update(index: number, value?: number, options?: any): void;
|
||||
}
|
||||
export default class MultiProgress {
|
||||
constructor(stream?: string);
|
||||
newBar(schema: string, options: ProgressBar.ProgressBarOptions): ProgressBar;
|
||||
terminate(): void;
|
||||
move(index: number): void;
|
||||
tick(index: number, value?: number, options?: any): void;
|
||||
update(index: number, value?: number, options?: any): void;
|
||||
}
|
||||
}
|
||||
|
106
@types/prompt.d.ts
vendored
106
@types/prompt.d.ts
vendored
@@ -2,65 +2,55 @@
|
||||
// Project: https://github.com/flatiron/prompt
|
||||
|
||||
declare module 'prompt' {
|
||||
type PropertiesType =
|
||||
| Array<string>
|
||||
| prompt.PromptSchema
|
||||
| Array<prompt.PromptPropertyOptions>;
|
||||
type PropertiesType = Array<string> | prompt.PromptSchema | Array<prompt.PromptPropertyOptions>;
|
||||
|
||||
namespace prompt {
|
||||
interface PromptSchema {
|
||||
properties: PromptProperties;
|
||||
namespace prompt {
|
||||
interface PromptSchema {
|
||||
properties: PromptProperties;
|
||||
}
|
||||
|
||||
interface PromptProperties {
|
||||
[propName: string]: PromptPropertyOptions;
|
||||
}
|
||||
|
||||
interface PromptPropertyOptions {
|
||||
name?: string;
|
||||
pattern?: RegExp;
|
||||
message?: string;
|
||||
required?: boolean;
|
||||
hidden?: boolean;
|
||||
description?: string;
|
||||
type?: string;
|
||||
default?: string;
|
||||
before?: (value: any) => any;
|
||||
conform?: (result: any) => boolean;
|
||||
}
|
||||
|
||||
export function start(): void;
|
||||
|
||||
export function get<T extends PropertiesType>(
|
||||
properties: T,
|
||||
callback: (
|
||||
err: Error,
|
||||
result: T extends Array<string>
|
||||
? Record<T[number], string>
|
||||
: T extends PromptSchema
|
||||
? Record<keyof T['properties'], string>
|
||||
: T extends Array<PromptPropertyOptions>
|
||||
? Record<T[number]['name'] extends string ? T[number]['name'] : number, string>
|
||||
: never,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
export function addProperties(obj: any, properties: PropertiesType, callback: (err: Error) => void): void;
|
||||
|
||||
export function history(propertyName: string): any;
|
||||
|
||||
export let override: any;
|
||||
export let colors: boolean;
|
||||
export let message: string;
|
||||
export let delimiter: string;
|
||||
}
|
||||
|
||||
interface PromptProperties {
|
||||
[propName: string]: PromptPropertyOptions;
|
||||
}
|
||||
|
||||
interface PromptPropertyOptions {
|
||||
name?: string;
|
||||
pattern?: RegExp;
|
||||
message?: string;
|
||||
required?: boolean;
|
||||
hidden?: boolean;
|
||||
description?: string;
|
||||
type?: string;
|
||||
default?: string;
|
||||
before?: (value: any) => any;
|
||||
conform?: (result: any) => boolean;
|
||||
}
|
||||
|
||||
export function start(): void;
|
||||
|
||||
export function get<T extends PropertiesType>(
|
||||
properties: T,
|
||||
callback: (
|
||||
err: Error,
|
||||
result: T extends Array<string>
|
||||
? Record<T[number], string>
|
||||
: T extends PromptSchema
|
||||
? Record<keyof T['properties'], string>
|
||||
: T extends Array<PromptPropertyOptions>
|
||||
? Record<
|
||||
T[number]['name'] extends string ? T[number]['name'] : number,
|
||||
string
|
||||
>
|
||||
: never,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
export function addProperties(
|
||||
obj: any,
|
||||
properties: PropertiesType,
|
||||
callback: (err: Error) => void,
|
||||
): void;
|
||||
|
||||
export function history(propertyName: string): any;
|
||||
|
||||
export let override: any;
|
||||
export let colors: boolean;
|
||||
export let message: string;
|
||||
export let delimiter: string;
|
||||
}
|
||||
|
||||
export = prompt;
|
||||
export = prompt;
|
||||
}
|
||||
|
26
@types/redux-localstorage.d.ts
vendored
26
@types/redux-localstorage.d.ts
vendored
@@ -3,23 +3,13 @@
|
||||
// import * as Redux from 'redux';
|
||||
|
||||
declare module 'redux-localstorage' {
|
||||
export interface ConfigRS {
|
||||
key: string;
|
||||
merge?: any;
|
||||
slicer?: any;
|
||||
serialize?: (
|
||||
value: any,
|
||||
replacer?: (key: string, value: any) => any,
|
||||
space?: string | number,
|
||||
) => string;
|
||||
deserialize?: (
|
||||
text: string,
|
||||
reviver?: (key: any, value: any) => any,
|
||||
) => any;
|
||||
}
|
||||
export interface ConfigRS {
|
||||
key: string;
|
||||
merge?: any;
|
||||
slicer?: any;
|
||||
serialize?: (value: any, replacer?: (key: string, value: any) => any, space?: string | number) => string;
|
||||
deserialize?: (text: string, reviver?: (key: any, value: any) => any) => any;
|
||||
}
|
||||
|
||||
export default function persistState(
|
||||
paths: string | string[],
|
||||
config: ConfigRS,
|
||||
): () => any;
|
||||
export default function persistState(paths: string | string[], config: ConfigRS): () => any;
|
||||
}
|
||||
|
153
@types/unexpected.d.ts
vendored
153
@types/unexpected.d.ts
vendored
@@ -1,86 +1,77 @@
|
||||
declare module 'unexpected' {
|
||||
namespace unexpected {
|
||||
interface EnchantedPromise<T> extends Promise<T> {
|
||||
and<A extends Array<unknown> = []>(
|
||||
assertionName: string,
|
||||
subject: unknown,
|
||||
...args: A
|
||||
): EnchantedPromise<any>;
|
||||
namespace unexpected {
|
||||
interface EnchantedPromise<T> extends Promise<T> {
|
||||
and<A extends Array<unknown> = []>(
|
||||
assertionName: string,
|
||||
subject: unknown,
|
||||
...args: A
|
||||
): EnchantedPromise<any>;
|
||||
}
|
||||
|
||||
interface Expect {
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/expect/
|
||||
*/
|
||||
<A extends Array<unknown> = []>(subject: unknown, assertionName: string, ...args: A): EnchantedPromise<any>;
|
||||
|
||||
it<A extends Array<unknown> = []>(
|
||||
assertionName: string,
|
||||
subject?: unknown,
|
||||
...args: A
|
||||
): EnchantedPromise<any>;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/clone/
|
||||
*/
|
||||
clone(): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/addAssertion/
|
||||
*/
|
||||
addAssertion<T, A extends Array<unknown> = []>(
|
||||
pattern: string,
|
||||
handler: (expect: Expect, subject: T, ...args: A) => void,
|
||||
): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/addType/
|
||||
*/
|
||||
addType<T>(typeDefinition: unexpected.TypeDefinition<T>): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/fail/
|
||||
*/
|
||||
fail<A extends Array<unknown> = []>(format: string, ...args: A): void;
|
||||
fail<E extends Error>(error: E): void;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/freeze/
|
||||
*/
|
||||
freeze(): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/use/
|
||||
*/
|
||||
use(plugin: unexpected.PluginDefinition): this;
|
||||
}
|
||||
|
||||
interface PluginDefinition {
|
||||
name?: string;
|
||||
version?: string;
|
||||
dependencies?: Array<string>;
|
||||
installInto(expect: Expect): void;
|
||||
}
|
||||
|
||||
interface TypeDefinition<T> {
|
||||
name: string;
|
||||
identify(value: unknown): value is T;
|
||||
base?: string;
|
||||
equal?(a: T, b: T, equal: (a: unknown, b: unknown) => boolean): boolean;
|
||||
inspect?(value: T, depth: number, output: any, inspect: (value: unknown, depth: number) => any): void;
|
||||
}
|
||||
}
|
||||
|
||||
interface Expect {
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/expect/
|
||||
*/
|
||||
<A extends Array<unknown> = []>(
|
||||
subject: unknown,
|
||||
assertionName: string,
|
||||
...args: A
|
||||
): EnchantedPromise<any>;
|
||||
const unexpected: unexpected.Expect;
|
||||
|
||||
it<A extends Array<unknown> = []>(
|
||||
assertionName: string,
|
||||
subject?: unknown,
|
||||
...args: A
|
||||
): EnchantedPromise<any>;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/clone/
|
||||
*/
|
||||
clone(): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/addAssertion/
|
||||
*/
|
||||
addAssertion<T, A extends Array<unknown> = []>(
|
||||
pattern: string,
|
||||
handler: (expect: Expect, subject: T, ...args: A) => void,
|
||||
): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/addType/
|
||||
*/
|
||||
addType<T>(typeDefinition: unexpected.TypeDefinition<T>): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/fail/
|
||||
*/
|
||||
fail<A extends Array<unknown> = []>(format: string, ...args: A): void;
|
||||
fail<E extends Error>(error: E): void;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/freeze/
|
||||
*/
|
||||
freeze(): this;
|
||||
|
||||
/**
|
||||
* @see http://unexpected.js.org/api/use/
|
||||
*/
|
||||
use(plugin: unexpected.PluginDefinition): this;
|
||||
}
|
||||
|
||||
interface PluginDefinition {
|
||||
name?: string;
|
||||
version?: string;
|
||||
dependencies?: Array<string>;
|
||||
installInto(expect: Expect): void;
|
||||
}
|
||||
|
||||
interface TypeDefinition<T> {
|
||||
name: string;
|
||||
identify(value: unknown): value is T;
|
||||
base?: string;
|
||||
equal?(a: T, b: T, equal: (a: unknown, b: unknown) => boolean): boolean;
|
||||
inspect?(
|
||||
value: T,
|
||||
depth: number,
|
||||
output: any,
|
||||
inspect: (value: unknown, depth: number) => any,
|
||||
): void;
|
||||
}
|
||||
}
|
||||
|
||||
const unexpected: unexpected.Expect;
|
||||
|
||||
export = unexpected;
|
||||
export = unexpected;
|
||||
}
|
||||
|
56
@types/webpack-loaders.d.ts
vendored
56
@types/webpack-loaders.d.ts
vendored
@@ -1,59 +1,59 @@
|
||||
declare module '*.html' {
|
||||
const url: string;
|
||||
export = url;
|
||||
const url: string;
|
||||
export = url;
|
||||
}
|
||||
|
||||
declare module '*.svg' {
|
||||
const url: string;
|
||||
export = url;
|
||||
const url: string;
|
||||
export = url;
|
||||
}
|
||||
|
||||
declare module '*.png' {
|
||||
const url: string;
|
||||
export = url;
|
||||
const url: string;
|
||||
export = url;
|
||||
}
|
||||
|
||||
declare module '*.gif' {
|
||||
const url: string;
|
||||
export = url;
|
||||
const url: string;
|
||||
export = url;
|
||||
}
|
||||
|
||||
declare module '*.jpg' {
|
||||
const url: string;
|
||||
export = url;
|
||||
const url: string;
|
||||
export = url;
|
||||
}
|
||||
|
||||
declare module '*.intl.json' {
|
||||
import { MessageDescriptor } from 'react-intl';
|
||||
import { MessageDescriptor } from 'react-intl';
|
||||
|
||||
const descriptor: Record<string, MessageDescriptor>;
|
||||
const descriptor: Record<string, MessageDescriptor>;
|
||||
|
||||
export = descriptor;
|
||||
export = descriptor;
|
||||
}
|
||||
|
||||
declare module '*.json' {
|
||||
const jsonContents: {
|
||||
[key: string]: any;
|
||||
};
|
||||
const jsonContents: {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export = jsonContents;
|
||||
export = jsonContents;
|
||||
}
|
||||
|
||||
declare module '*.scss' {
|
||||
// TODO: replace with:
|
||||
// https://www.npmjs.com/package/css-modules-typescript-loader
|
||||
// https://github.com/Jimdo/typings-for-css-modules-loader
|
||||
const classNames: {
|
||||
[className: string]: string;
|
||||
};
|
||||
// TODO: replace with:
|
||||
// https://www.npmjs.com/package/css-modules-typescript-loader
|
||||
// https://github.com/Jimdo/typings-for-css-modules-loader
|
||||
const classNames: {
|
||||
[className: string]: string;
|
||||
};
|
||||
|
||||
export = classNames;
|
||||
export = classNames;
|
||||
}
|
||||
|
||||
declare module '*.css' {
|
||||
const classNames: {
|
||||
[className: string]: string;
|
||||
};
|
||||
const classNames: {
|
||||
[className: string]: string;
|
||||
};
|
||||
|
||||
export = classNames;
|
||||
export = classNames;
|
||||
}
|
||||
|
Reference in New Issue
Block a user