mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 06:28:54 +00:00
refactor(utils): setCallback
This commit is contained in:
1 parent
68f0dc526a
commit
bcb703a11f
4 files changed
+21
-26
No files matched your search
@@ -0,0 +1,6 @@
|
||||
import type { CFXCallback, CFXParameters } from '../types';
|
||||
|
||||
export const setCallback = (parameters?: CFXParameters | CFXCallback, cb?: CFXCallback) => {
|
||||
if (cb && typeof cb === 'function') return cb;
|
||||
if (parameters && typeof parameters === 'function') return parameters;
|
||||
};
|
||||
Reference in new issue
Block a user