You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/types/types/index.d.ts
+44-1Lines changed: 44 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,23 @@ export type StringPointer = Pointer;
6
6
exporttypeStringArrayPointer=Pointer;
7
7
exporttypeDateString=string;
8
8
9
+
/**
10
+
* Options for readFile.
11
+
*
12
+
* @see [Emscripten File System API](https://emscripten.org/docs/api_reference/Filesystem-API.html#FS.readFile)
13
+
* @category File System
14
+
*/
9
15
exportinterfaceReadFileOptions{
16
+
/** encoding of the file, must be `binary` or `utf8` */
10
17
encdoing: string;
11
18
}
12
19
20
+
/**
21
+
* Describes attributes of a node. (a.k.a file, directory)
22
+
*
23
+
* @see [Emscripten File System API](https://emscripten.org/docs/api_reference/Filesystem-API.html#FS.stat)
24
+
* @category File System
25
+
*/
13
26
exportinterfaceStat{
14
27
dev: number;
15
28
ino: number;
@@ -26,6 +39,12 @@ export interface Stat {
26
39
blocks: number;
27
40
}
28
41
42
+
/**
43
+
* Functions to interact with Emscripten FS library.
44
+
*
45
+
* @see [Emscripten File System API](https://emscripten.org/docs/api_reference/Filesystem-API.html)
46
+
* @category File System
47
+
*/
29
48
exportinterfaceFS{
30
49
mkdir: (path: string)=>void;
31
50
rmdir: (path: string)=>void;
@@ -35,21 +54,42 @@ export interface FS {
35
54
readdir: (path: string)=>string[];
36
55
unlink: (path: string)=>void;
37
56
stat: (path: string)=>Stat;
57
+
/** mode is a numeric notation of permission, @see [Numeric Notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) */
38
58
isFile: (mode: number)=>boolean;
59
+
/** mode is a numeric notation of permission, @see [Numeric Notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) */
39
60
isDir: (mode: number)=>boolean;
40
61
}
41
62
63
+
/**
64
+
* Arguments passed to setLogger callback function.
65
+
*/
42
66
exportinterfaceLog{
67
+
/** file descriptor of the log, must be `stdout` or `stderr` */
43
68
type: string;
44
69
message: string;
45
70
}
46
71
72
+
/**
73
+
* Arguments passed to setProgress callback function.
74
+
*/
75
+
exportinterfaceProgress{
76
+
/** progress of the operation, interval = [0, 1] */
77
+
progress: number;
78
+
/** time of transcoded media in microseconds, ex: if a video is 10 seconds long, when time is 1000000 means 1 second of the video is transcoded already. */
79
+
time: number;
80
+
}
81
+
82
+
/**
83
+
* FFmpeg core module, an object to interact with ffmpeg.
84
+
*/
47
85
exportinterfaceFFmpegCoreModule{
86
+
/** default arguments prepend when running exec() */
48
87
DEFAULT_ARGS: string[];
49
88
FS: FS;
50
89
NULL: Pointer;
51
90
SIZE_I32: number;
52
91
92
+
/** return code of the ffmpeg exec, error when ret != 0 */
0 commit comments