mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
28 lines
715 B
Text
28 lines
715 B
Text
declare fs: {
|
|
readFile: (path: string) -> string,
|
|
readDir: (path: string) -> { string },
|
|
writeFile: (path: string, contents: string) -> (),
|
|
writeDir: (path: string) -> (),
|
|
removeFile: (path: string) -> (),
|
|
removeDir: (path: string) -> (),
|
|
isFile: (path: string) -> boolean,
|
|
isDir: (path: string) -> boolean,
|
|
}
|
|
|
|
declare json: {
|
|
encode: (value: any, pretty: boolean?) -> string,
|
|
decode: (encoded: string) -> any,
|
|
}
|
|
|
|
declare process: {
|
|
getEnvVars: () -> { string },
|
|
getEnvVar: (key: string) -> string?,
|
|
setEnvVar: (key: string, value: string) -> (),
|
|
exit: (code: number?) -> (),
|
|
spawn: (program: string, params: { string }?) -> {
|
|
ok: boolean,
|
|
code: number,
|
|
stdout: string,
|
|
stderr: string,
|
|
},
|
|
}
|