char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somport file extension to typescriptdea05b4

main
7.4 KiB105 linesraw
1declare module "ext:core/ops" {
2  type FileReply<T> = import("./errors.ts").FileReply<T>;
3  type Reply<T> = FileReply<T>;
4  export type Metadata = [
5    boolean,
6    boolean,
7    boolean,
8    number,
9    number | null,
10    number | null,
11    number | null,
12    number | null,
13    number | null,
14    number | null,
15  ];
16  export type Entry = [string, boolean, boolean, boolean];
17  export type WatchEvent = [kind: 0 | 1 | 2 | 3 | 4, paths: string[]];
18  export type CopyInfo =
19    | [kind: 0, mode: number | null, identity: null, source: string]
20    | [kind: 1, mode: number | null, identity: string, source: string]
21    | [kind: 2, mode: number | null, identity: null, source: string];
22  export const op_file_chmod: (args: [string, number]) => Promise<Reply<null>>;
23  export const op_file_chmod_sync: (args: [string, number]) => Reply<null>;
24  export const op_file_chown: (args: [string, number | null, number | null]) => Promise<Reply<null>>;
25  export const op_file_chown_sync: (args: [string, number | null, number | null]) => Reply<null>;
26  export const op_file_close: (args: [number, boolean]) => Reply<boolean>;
27  export const op_file_copy: (args: [string, string]) => Promise<Reply<null>>;
28  export const op_file_copy_sync: (args: [string, string]) => Reply<null>;
29  export const op_file_copy_dir_mode: (args: [string, number | null]) => Promise<Reply<null>>;
30  export const op_file_copy_dir_mode_sync: (args: [string, number | null]) => Reply<null>;
31  export const op_file_copy_link: (args: [string, string]) => Promise<Reply<null>>;
32  export const op_file_copy_link_sync: (args: [string, string]) => Reply<null>;
33  export const op_file_ensure_dir: (args: [string, number | null]) => Promise<Reply<null>>;
34  export const op_file_ensure_dir_sync: (args: [string, number | null]) => Reply<null>;
35  export const op_file_fchmod: (args: [number, number]) => Promise<Reply<null>>;
36  export const op_file_fchmod_sync: (args: [number, number]) => Reply<null>;
37  export const op_file_fchown: (args: [number, number | null, number | null]) => Promise<Reply<null>>;
38  export const op_file_fchown_sync: (args: [number, number | null, number | null]) => Reply<null>;
39  export const op_file_flock: (args: [number, boolean]) => Promise<Reply<null>>;
40  export const op_file_flock_sync: (args: [number, boolean]) => Reply<null>;
41  export const op_file_funlock: (id: number) => Promise<Reply<null>>;
42  export const op_file_funlock_sync: (id: number) => Reply<null>;
43  export const op_file_futime: (args: [number, number, number, number, number]) => Promise<Reply<null>>;
44  export const op_file_futime_sync: (args: [number, number, number, number, number]) => Reply<null>;
45  export const op_file_link: (args: [string, string]) => Promise<Reply<null>>;
46  export const op_file_link_sync: (args: [string, string]) => Reply<null>;
47  export const op_file_lchown: (args: [string, number | null, number | null]) => Promise<Reply<null>>;
48  export const op_file_lchown_sync: (args: [string, number | null, number | null]) => Reply<null>;
49  export const op_file_lutime: (args: [string, number, number, number, number]) => Promise<Reply<null>>;
50  export const op_file_lutime_sync: (args: [string, number, number, number, number]) => Reply<null>;
51  export const op_file_mkdir: (args: [string, number | null]) => Promise<Reply<null>>;
52  export const op_file_mkdir_sync: (args: [string, number | null]) => Reply<null>;
53  export const op_file_open: (
54    args: [string, [boolean, boolean, boolean, boolean, boolean, boolean, number | null]],
55  ) => Promise<Reply<number>>;
56  export const op_file_open_sync: (
57    args: [string, [boolean, boolean, boolean, boolean, boolean, boolean, number | null]],
58  ) => Reply<number>;
59  export const op_file_path_join: (args: [string, string]) => Reply<string>;
60  export const op_file_path_parent: (path: string) => Reply<string>;
61  export const op_file_path_stat: (args: [string, boolean]) => Promise<Reply<Metadata>>;
62  export const op_file_path_stat_sync: (args: [string, boolean]) => Reply<Metadata>;
63  export const op_file_path_truncate: (args: [string, number]) => Promise<Reply<null>>;
64  export const op_file_path_truncate_sync: (args: [string, number]) => Reply<null>;
65  export const op_file_prepare_copy: (args: [string, string, boolean, boolean]) => Promise<Reply<CopyInfo>>;
66  export const op_file_prepare_copy_sync: (args: [string, string, boolean, boolean]) => Reply<CopyInfo>;
67  export const op_file_read: (args: [number, number]) => Promise<Reply<Uint8Array<ArrayBuffer> | null>>;
68  export const op_file_read_sync: (args: [number, number]) => Reply<Uint8Array<ArrayBuffer> | null>;
69  export const op_file_read_dir: (path: string) => Promise<Reply<Entry[]>>;
70  export const op_file_read_dir_sync: (path: string) => Reply<Entry[]>;
71  export const op_file_read_link: (path: string) => Promise<Reply<string>>;
72  export const op_file_read_link_sync: (path: string) => Reply<string>;
73  export const op_file_read_tree_dir: (path: string) => Promise<Reply<string[]>>;
74  export const op_file_read_tree_dir_sync: (path: string) => Reply<string[]>;
75  export const op_file_real_path: (path: string) => Promise<Reply<string>>;
76  export const op_file_real_path_sync: (path: string) => Reply<string>;
77  export const op_file_remove: (args: [string, boolean]) => Promise<Reply<null>>;
78  export const op_file_remove_sync: (args: [string, boolean]) => Reply<null>;
79  export const op_file_rename: (args: [string, string]) => Promise<Reply<null>>;
80  export const op_file_rename_sync: (args: [string, string]) => Reply<null>;
81  export const op_file_seek: (args: [number, number, number]) => Promise<Reply<number>>;
82  export const op_file_seek_sync: (args: [number, number, number]) => Reply<number>;
83  export const op_file_stat: (id: number) => Promise<Reply<Metadata>>;
84  export const op_file_stat_sync: (id: number) => Reply<Metadata>;
85  export const op_file_symlink: (args: [string, string, "file" | "dir" | null]) => Promise<Reply<null>>;
86  export const op_file_symlink_sync: (args: [string, string, "file" | "dir" | null]) => Reply<null>;
87  export const op_file_sync: (args: [number, boolean]) => Promise<Reply<null>>;
88  export const op_file_sync_sync: (args: [number, boolean]) => Reply<null>;
89  export const op_file_tmp_dir: () => Reply<string>;
90  export const op_file_truncate: (args: [number, number]) => Promise<Reply<null>>;
91  export const op_file_truncate_sync: (args: [number, number]) => Reply<null>;
92  export const op_file_url_path: (url: string) => Reply<string>;
93  export const op_file_utime: (args: [string, number, number, number, number]) => Promise<Reply<null>>;
94  export const op_file_utime_sync: (args: [string, number, number, number, number]) => Reply<null>;
95  export const op_file_watch: (args: [string[], boolean]) => Reply<number>;
96  export const op_file_watch_close: (args: [number, boolean]) => Reply<boolean>;
97  export const op_file_watch_keepalive: (args: [number, number]) => Promise<Reply<boolean>>;
98  export const op_file_watch_next: (id: number) => Promise<Reply<WatchEvent | null>>;
99  export const op_file_watch_next_unref: (id: number) => Promise<Reply<WatchEvent | null>>;
100  export const op_file_watch_ref: (id: number) => Reply<number>;
101  export const op_file_write: (args: [number, Uint8Array<ArrayBuffer>]) => Promise<Reply<number>>;
102  export const op_file_write_sync: (args: [number, Uint8Array<ArrayBuffer>]) => Reply<number>;
103  export const op_file_writev: (args: [number, Uint8Array<ArrayBuffer>[]]) => Promise<Reply<number>>;
104  export const op_file_writev_sync: (args: [number, Uint8Array<ArrayBuffer>[]]) => Reply<number>;
105}