-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.ts
40 lines (32 loc) · 918 Bytes
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Lokales } from './';
export type LokalesErrorHandler = (err?: Error) => void;
export type LokalesUpdateHandler = (err?: Error, updated?: ILokalesUpdated, lokales?: Lokales) => void;
export type LokalesOptionKeys = 'directory' | 'locale' | 'localeFallback' | 'update' | 'onUpdate' | 'onError';
export interface IMap<T> {
[key: string]: T;
}
export interface ILokalesOptions {
directory?: string;
locale?: string;
localeFallback?: string;
update?: boolean;
stripAnsi?: boolean;
onUpdate?: LokalesUpdateHandler;
onError?: LokalesErrorHandler;
}
export interface ILokalesUpdated {
singular?: string;
plural?: string;
count?: number;
args?: any[];
options?: ILokalesOptions;
}
export interface ILokalesItem {
one: string;
other: string;
}
export interface ILokalesResult {
val: string;
args: any[];
}
export interface ILokalesCache extends IMap<ILokalesItem | string> { }