forked from WebThingsIO/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.d.ts
More file actions
40 lines (33 loc) · 751 Bytes
/
global.d.ts
File metadata and controls
40 lines (33 loc) · 751 Bytes
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
/**
* Best effort declaration files.
*/
declare namespace ANSN1 {
type EncoderInputTypes = string | number | boolean | number[] | string[] | Buffer;
type EncoderInput = {
[id: string]: EncoderInputTypes | EncoderInput;
};
type PemParams = {
label: string;
}
class Builder {
seq(): this;
obj(...keys: this[]): this;
key(name: string): this;
int(): this;
octstr(): this;
explicit(n: number): this;
bitstr(): this;
optional(): this;
objid(): this;
}
class Encoder {
encode(input: EncoderInput, type: 'pem', params: PemParams): string;
}
export function define(
subject: string,
fn: (this: Builder) => void,
): Encoder;
}
declare module 'asn1.js' {
export = ANSN1;
}