Skip to content

Commit

Permalink
fix: missing typings for Types constant
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Jun 24, 2023
1 parent 7f35cf5 commit 04601dd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions typings/mysql/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export {

export * from './lib/protocol/packets/index.js';
export * from './lib/Auth.js';
export * from './lib/constants/index.js';

// Expose class interfaces
export interface Connection extends BaseConnection {}
Expand Down
38 changes: 38 additions & 0 deletions typings/mysql/lib/constants/Types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Constant `Types`.
*
* Please note that `Types` can only be accessed from the `mysql` object and not imported directly.
*/
declare const Types: {
[key: number]: string;
DECIMAL: 0x00;
TINY: 0x01;
SHORT: 0x02;
LONG: 0x03;
FLOAT: 0x04;
DOUBLE: 0x05;
NULL: 0x06;
TIMESTAMP: 0x07;
LONGLONG: 0x08;
INT24: 0x09;
DATE: 0x0a;
TIME: 0x0b;
DATETIME: 0x0c;
YEAR: 0x0d;
NEWDATE: 0x0e;
VARCHAR: 0x0f;
BIT: 0x10;
JSON: 0xf5;
NEWDECIMAL: 0xf6;
ENUM: 0xf7;
SET: 0xf8;
TINY_BLOB: 0xf9;
MEDIUM_BLOB: 0xfa;
LONG_BLOB: 0xfb;
BLOB: 0xfc;
VAR_STRING: 0xfd;
STRING: 0xfe;
GEOMETRY: 0xff;
};

export { Types };
3 changes: 3 additions & 0 deletions typings/mysql/lib/constants/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Types } from './Types.js';

export { Types };

0 comments on commit 04601dd

Please sign in to comment.