Update types
This commit is contained in:
parent
880ad8a268
commit
0acad2f90b
21
packages/types/types/index.d.ts
vendored
21
packages/types/types/index.d.ts
vendored
@ -1,13 +1,31 @@
|
|||||||
// TODO: Add lint and test.
|
// TODO: Add lint and test.
|
||||||
|
|
||||||
export type Pointer = number;
|
export type Pointer = number;
|
||||||
|
|
||||||
export type StringPointer = Pointer;
|
export type StringPointer = Pointer;
|
||||||
export type StringArrayPointer = Pointer;
|
export type StringArrayPointer = Pointer;
|
||||||
|
export type DateString = string;
|
||||||
|
|
||||||
export interface ReadFileOptions {
|
export interface ReadFileOptions {
|
||||||
encdoing: string;
|
encdoing: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Stat {
|
||||||
|
dev: number;
|
||||||
|
ino: number;
|
||||||
|
mode: number;
|
||||||
|
nlink: number;
|
||||||
|
uid: number;
|
||||||
|
gid: number;
|
||||||
|
rdev: number;
|
||||||
|
size: number;
|
||||||
|
atime: DateString;
|
||||||
|
mtime: DateString;
|
||||||
|
ctime: DateString;
|
||||||
|
blksize: number;
|
||||||
|
blocks: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface FS {
|
export interface FS {
|
||||||
mkdir: (path: string) => void;
|
mkdir: (path: string) => void;
|
||||||
rmdir: (path: string) => void;
|
rmdir: (path: string) => void;
|
||||||
@ -16,6 +34,9 @@ export interface FS {
|
|||||||
readFile: (path: string, opts: OptionReadFile) => Uint8Array | string;
|
readFile: (path: string, opts: OptionReadFile) => Uint8Array | string;
|
||||||
readdir: (path: string) => string[];
|
readdir: (path: string) => string[];
|
||||||
unlink: (path: string) => void;
|
unlink: (path: string) => void;
|
||||||
|
stat: (path: string) => Stat;
|
||||||
|
isFile: (mode: number) => boolean;
|
||||||
|
isDir: (mode: number) => boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Log {
|
export interface Log {
|
||||||
|
Loading…
Reference in New Issue
Block a user