forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows-1251.d.ts
26 lines (21 loc) · 847 Bytes
/
windows-1251.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
// Type definitions for windows-1251 v0.1.2
// Project: https://github.com/mathiasbynens/windows-1251
// Definitions by: RomanGolovanov <https://github.com/RomanGolovanov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace windows1251 {
type EncoderMode = 'fatal' | 'html';
type DecoderMode = 'replacement' | 'fatal';
interface windows1251 {
encode(input:string, options?:{ mode?: EncoderMode }):string;
decode(text: string, options?:{ mode?: DecoderMode }): string;
}
}
declare module 'windows-1251' {
var windows1251: {
encode(input:string, options?:{ mode?: windows1251.EncoderMode }):string;
decode(text: string, options?:{ mode?: windows1251.DecoderMode }): string;
version: string;
labels: string[];
}
export = windows1251;
}