Skip to content

Commit 04601dd

Browse files
committed
fix: missing typings for Types constant
1 parent 7f35cf5 commit 04601dd

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

typings/mysql/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export {
3232

3333
export * from './lib/protocol/packets/index.js';
3434
export * from './lib/Auth.js';
35+
export * from './lib/constants/index.js';
3536

3637
// Expose class interfaces
3738
export interface Connection extends BaseConnection {}
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Constant `Types`.
3+
*
4+
* Please note that `Types` can only be accessed from the `mysql` object and not imported directly.
5+
*/
6+
declare const Types: {
7+
[key: number]: string;
8+
DECIMAL: 0x00;
9+
TINY: 0x01;
10+
SHORT: 0x02;
11+
LONG: 0x03;
12+
FLOAT: 0x04;
13+
DOUBLE: 0x05;
14+
NULL: 0x06;
15+
TIMESTAMP: 0x07;
16+
LONGLONG: 0x08;
17+
INT24: 0x09;
18+
DATE: 0x0a;
19+
TIME: 0x0b;
20+
DATETIME: 0x0c;
21+
YEAR: 0x0d;
22+
NEWDATE: 0x0e;
23+
VARCHAR: 0x0f;
24+
BIT: 0x10;
25+
JSON: 0xf5;
26+
NEWDECIMAL: 0xf6;
27+
ENUM: 0xf7;
28+
SET: 0xf8;
29+
TINY_BLOB: 0xf9;
30+
MEDIUM_BLOB: 0xfa;
31+
LONG_BLOB: 0xfb;
32+
BLOB: 0xfc;
33+
VAR_STRING: 0xfd;
34+
STRING: 0xfe;
35+
GEOMETRY: 0xff;
36+
};
37+
38+
export { Types };
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Types } from './Types.js';
2+
3+
export { Types };

0 commit comments

Comments
 (0)