✨ types(hooks): fs.copyAsync/removeAsync, context.after auch für Jobs/Tasks
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
1 parent
3ef0d86290
commit
e8cf990959
1 file changed
+16
-3
Vendored
+16
-3
@@ -1481,6 +1481,12 @@ declare global {
|
||||
*/
|
||||
remove(path: string): void
|
||||
|
||||
/**
|
||||
* Wie `remove`, aber als Promise (große Bäume blockieren den
|
||||
* JS-Thread nicht).
|
||||
*/
|
||||
removeAsync(path: string): Promise<void>
|
||||
|
||||
/**
|
||||
* copy file or directory
|
||||
*
|
||||
@@ -1488,6 +1494,12 @@ declare global {
|
||||
* @param dest
|
||||
*/
|
||||
copy(src: string, dest: string): void
|
||||
|
||||
/**
|
||||
* Wie `copy`, aber als Promise (rekursives Kopieren läuft außerhalb
|
||||
* des JS-Threads).
|
||||
*/
|
||||
copyAsync(src: string, dest: string): Promise<void>
|
||||
}
|
||||
|
||||
interface TplPackage {
|
||||
@@ -2745,9 +2757,10 @@ declare global {
|
||||
task?: TaskConfig
|
||||
|
||||
/**
|
||||
* Registriert eine Funktion, die **nach** dem Schreiben der
|
||||
* HTTP-Antwort läuft (max. 2 s). Fehler ändern die Antwort nie.
|
||||
* Nur in HTTP-Hooks verfügbar.
|
||||
* Registriert eine Funktion, die **nach** dem Lauf läuft
|
||||
* (max. 2 s pro Funktion). Bei HTTP-Hooks nach dem Response-Write
|
||||
* (die Antwort wartet nie), bei Jobs und Tasks direkt nach dem Lauf.
|
||||
* Fehler ändern die Antwort nie.
|
||||
*/
|
||||
after(fn: () => void | Promise<void>): void
|
||||
|
||||
|
||||
Reference in new issue
Block a user