mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
string is an acceptable type of ssl attr
This commit is contained in:
3
types/mysql/index.d.ts
vendored
3
types/mysql/index.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/mysqljs/mysql
|
||||
// Definitions by: William Johnston <https://github.com/wjohnsto>
|
||||
// Kacper Polak <https://github.com/kacepe>
|
||||
// Krittanan Pingclasai <https://github.com/kpping>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
@@ -422,7 +423,7 @@ export interface ConnectionConfig extends ConnectionOptions {
|
||||
/**
|
||||
* object with ssl parameters or a string containing name of ssl profile
|
||||
*/
|
||||
ssl?: tls.SecureContextOptions & { rejectUnauthorized?: boolean };
|
||||
ssl?: string | (tls.SecureContextOptions & { rejectUnauthorized?: boolean });
|
||||
}
|
||||
|
||||
export interface PoolConfig extends ConnectionConfig {
|
||||
|
||||
@@ -39,6 +39,11 @@ connection.query('SELECT 1', (err, rows) => {
|
||||
// connected! (unless `err` is set)
|
||||
});
|
||||
|
||||
connection = mysql.createConnection({
|
||||
host: 'localhost',
|
||||
ssl: 'Amazon RDS'
|
||||
});
|
||||
|
||||
connection = mysql.createConnection({
|
||||
host: 'localhost',
|
||||
ssl: {
|
||||
|
||||
Reference in New Issue
Block a user