📂 FileMgr
📍
/home/rla105zs937x/public_html/kalamtrophy.in/finance/node_modules/agent-base/src
✏️ Edit File: /home/rla105zs937x/public_html/kalamtrophy.in/finance/node_modules/agent-base/src/promisify.ts
⬅ Kembali
import { Agent, ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise, AgentCallbackReturn } from './index'; type LegacyCallback = ( req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback ) => void; export default function promisify(fn: LegacyCallback): AgentCallbackPromise { return function(this: Agent, req: ClientRequest, opts: RequestOptions) { return new Promise((resolve, reject) => { fn.call( this, req, opts, (err: Error | null | undefined, rtn?: AgentCallbackReturn) => { if (err) { reject(err); } else { resolve(rtn); } } ); }); }; }
💾 Simpan File
Batal
⬅ Naik ke agent-base
2 item
Nama
Tipe
Ukuran
Diubah
Aksi
📄
index.ts
ts
8.8 KB
2026-06-24 04:18
✏️ Edit
👁️ View
🗑 Hapus
📄
promisify.ts
ts
649 B
2026-06-24 04:18
✏️ Edit
👁️ View
🗑 Hapus