Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 1edbc9f

Browse files
committed
fix(lib/ts): build issues and export name
1 parent 586340d commit 1edbc9f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/MySQL.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const safeArgs = (query: Query | Transaction, params?: any, cb?: Function, trans
8585
return [query, params, cb];
8686
};
8787

88+
declare var global: any;
8889
const exp = global.exports.oxmysql;
8990
const currentResourceName = GetCurrentResourceName();
9091

@@ -111,7 +112,7 @@ export const oxmysql: OxMySQL = {
111112
},
112113
ready(callback) {
113114
setImmediate(async () => {
114-
while (GetResourceState('oxmysql') !== 'started') await new Promise((resolve) => setTimeout(resolve, 50));
115+
while (GetResourceState('oxmysql') !== 'started') await new Promise((resolve) => setTimeout(resolve, 50, null));
115116
callback();
116117
});
117118
},
@@ -162,6 +163,6 @@ export const oxmysql: OxMySQL = {
162163
return await exp.awaitConnection();
163164
},
164165
async startTransaction(cb) {
165-
return exp.experimentalTransaction(cb, currentResourceName);
166+
return exp.startTransaction(cb, currentResourceName);
166167
},
167168
};

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@overextended/oxmysql",
3-
"version": "1.3.0",
3+
"version": "1.4.2",
44
"description": "Exports wrapper for oxmysql",
55
"types": "MySQL.d.ts",
66
"main": "MySQL.js",

lib/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"outDir": ".",
55
"strict": true,
66
"module": "CommonJS",
7-
"types": ["@citizenfx/server", "@types/node"],
7+
"types": ["@citizenfx/server"],
88
"declaration": true,
99
"sourceMap": true,
1010
"target": "ESNext",

0 commit comments

Comments
 (0)