-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc.d.ts
41 lines (36 loc) · 1.33 KB
/
src.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
41
declare module "node-forge" {
declare type Ed25519PublicKey = {
publicKeyBytes: Buffer;
} & Buffer;
declare type Ed25519PrivateKey = {
privateKeyBytes: Buffer;
} & Buffer;
class ed25519 {
static generateKeyPair(): { publicKey: Ed25519PublicKey, privateKey: Ed25519PrivateKey };
static privateKeyToPem(key: Ed25519PrivateKey): string;
static privateKeyFromPem(pem: string): Ed25519PrivateKey;
static publicKeyToPem(key: Ed25519PublicKey): string;
static publicKeyFromPem(pem: string): Ed25519PublicKey;
}
}
interface FileSystemDirectoryHandle {
[Symbol.asyncIterator](): AsyncIterator<[string, FileSystemFileHandle | FileSystemDirectoryHandle]>;
requestPermission(config: { mode: "read" | "readwrite" }): Promise<void>;
}
interface FileSystemFileHandle {
getFile(): File;
createWritable(): FileSystemWritableFileStream;
}
interface Window {
showSaveFilePicker(config?: {
types: {
description: string; accept: { [mimeType: string]: string[] }
}[];
}): Promise<FileSystemFileHandle>;
showDirectoryPicker(): Promise<FileSystemDirectoryHandle>;
showOpenFilePicker(config?: {
types: {
description: string; accept: { [mimeType: string]: string[] }
}[];
}): Promise<FileSystemFileHandle[]>;
}