One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
6955
/
root
/
usr
/
share
/
nodejs
/
@types
/
iferr
/
Edit File:
index.d.ts
// Type definitions for iferr 1.0 // Project: https://github.com/shesek/iferr // Definitions by: segayuu <https://github.com/segayuu> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped type nodeCallback<T> = (err: Error | null, ...a: T[]) => any; // Delegates to `succ` on sucecss or to `fail` on error // ex: Thing.load(123, iferr(cb, thing => ...)) declare function iferr<T>(fail: (err: Error) => void, succ: (...result: T[]) => void): nodeCallback<T>; declare namespace iferr { // Delegates to `succ` on sucecss or to `fail` on error // ex: Thing.load(123, iferr(cb, thing => ...)) function iferr<T>(fail: (err: Error) => void, succ: (...result: T[]) => void): nodeCallback<T>; // Like iferr, but also catches errors thrown from `succ` and passes to `fail` function tiferr<T>(fail: (err: Error) => void, succ: (...result: T[]) => void): nodeCallback<T>; // Delegate to the success function on success, throws the error otherwise // ex: Thing.load(123, throwerr(thing => ...)) function throwerr<T>(succ: (...result: T[]) => void): nodeCallback<T>; // Prints errors when one is passed, or does nothing otherwise // ex: Thing.load(123, printerr) function printerr(): nodeCallback<any>; } export = iferr;
Simpan