Skip to content

Commit

Permalink
Add missing authPlugins property to ConnectionOptions and PoolOptions (
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg authored Mar 16, 2020
1 parent a296c82 commit b549352
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ export interface FieldPacket extends mysql.FieldPacket {
characterSet: number
}

type authPlugins =
(pluginMetadata: { connection: Connection; command: string }) =>
(pluginData: Buffer) => Promise<string>;

export interface ConnectionOptions extends mysql.ConnectionOptions {
authPlugins?: {
[key: string]: authPlugins;
};
}

export interface PoolOptions extends mysql.PoolOptions {
authPlugins?: {
[key: string]: authPlugins;
};
}

export function createConnection(connectionUri: string): Connection;
export function createConnection(config: ConnectionOptions): Connection;
export function createPool(config: PoolOptions): Pool;

0 comments on commit b549352

Please sign in to comment.