-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
40 lines (30 loc) · 1.06 KB
/
index.d.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
export type Mixed = string | number | boolean | symbol | object
export type Transformer = (value: string, key: string, collection: any[]) => string
export type TransformerMap = {
[key: string]: Transformer
}
export interface FormatPartial <T extends string> {
(replacements?: null | undefined): FormatPartial<T>
(replacements: any): string
raw: T
}
export interface Format {
<T extends string> (template: T, replacements?: null | undefined): FormatPartial<T>
(template: string, replacements: any): string
}
export interface Strat {
<T extends string> (template: T): FormatPartial<T>
<T extends string> (template: T, replacements?: null | undefined): FormatPartial<T>
(template: string, replacements: any): string
create (transformers?: TransformerMap): Format
extend (
prototype: object,
transformers?: TransformerMap
): void
errors: {
ERR_ARGS_ARRAY: 'replacements argument must be an array, not a parameter list',
ERR_NUMBERING_MIX: 'cannot mix implicit & explicit formatting'
}
}
declare const strat: Strat
export default strat