Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix various typos #1589

Merged
merged 5 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ interface AzureActiveDirectoryMsiAppServiceAuthentication {
options: {
/**
* If you user want to connect to an Azure app service using a specific client account
* they need to provide `clientId` asscoiate to their created idnetity.
* they need to provide `clientId` associate to their created identity.
*
* This is optional for retrieve token from azure web app service
*/
Expand Down Expand Up @@ -242,7 +242,7 @@ interface AzureActiveDirectoryAccessTokenAuthentication {
type: 'azure-active-directory-access-token';
options: {
/**
* A user need to provide `token` which they retrived else where
* A user need to provide `token` which they retrieved else where
* to forming the connection.
*/
token: string;
Expand All @@ -253,12 +253,12 @@ interface AzureActiveDirectoryPasswordAuthentication {
type: 'azure-active-directory-password';
options: {
/**
* A user need to provide `userName` asscoiate to their account.
* A user need to provide `userName` associate to their account.
*/
userName: string;

/**
* A user need to provide `password` asscoiate to their account.
* A user need to provide `password` associate to their account.
*/
password: string;

Expand Down Expand Up @@ -436,7 +436,7 @@ export interface ConnectionConfiguration {
*/
options?: ConnectionOptions;
/**
* Authentication realted options for connection.
* Authentication related options for connection.
*/
authentication?: AuthenticationOptions;
}
Expand Down Expand Up @@ -1234,7 +1234,7 @@ class Connection extends EventEmitter {
appName: undefined,
camelCaseColumns: false,
cancelTimeout: DEFAULT_CANCEL_TIMEOUT,
columnEncryptionKeyCacheTTL: 2 * 60 * 60 * 1000, // Units: miliseconds
columnEncryptionKeyCacheTTL: 2 * 60 * 60 * 1000, // Units: milliseconds
columnEncryptionSetting: false,
columnNameReplacer: undefined,
connectionRetryInterval: DEFAULT_CONNECT_RETRY_INTERVAL,
Expand Down Expand Up @@ -2165,7 +2165,7 @@ class Connection extends EventEmitter {
// If we have routing data stored, this connection has been redirected
const server = this.routingData ? this.routingData.server : this.config.server;
const port = this.routingData ? `:${this.routingData.port}` : hostPostfix;
// Grab the target host from the connection configration, and from a redirect message
// Grab the target host from the connection configuration, and from a redirect message
// otherwise, leave the message empty.
const routingMessage = this.routingData ? ` (redirected from ${this.config.server}${hostPostfix})` : '';
const message = `Failed to connect to ${server}${port}${routingMessage} in ${this.config.options.connectTimeout}ms`;
Expand Down Expand Up @@ -2301,7 +2301,7 @@ class Connection extends EventEmitter {
// If we have routing data stored, this connection has been redirected
const server = this.routingData ? this.routingData.server : this.config.server;
const port = this.routingData ? `:${this.routingData.port}` : hostPostfix;
// Grab the target host from the connection configration, and from a redirect message
// Grab the target host from the connection configuration, and from a redirect message
// otherwise, leave the message empty.
const routingMessage = this.routingData ? ` (redirected from ${this.config.server}${hostPostfix})` : '';
const message = `Failed to connect to ${server}${port}${routingMessage} - ${error.message}`;
Expand Down
2 changes: 1 addition & 1 deletion src/data-types/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Date: DataType = {
yield buffer;
},

// TODO: value is techincally of type 'unknown'.
// TODO: value is technically of type 'unknown'.
validate: function(value): null | Date {
if (value == null) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/message-io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class MessageIO extends EventEmitter {
};

const onReadable = () => {
// When there is handshake data on the encryped stream of the secure pair,
// When there is handshake data on the encrypted stream of the secure pair,
// we wrap it into a `PRELOGIN` message and send it to the server.
//
// For each `PRELOGIN` message we sent we get back exactly one response message
Expand Down
12 changes: 6 additions & 6 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Collation } from './collation';
type CompletionCallback =
/**
* @param error
* If an error occured, an error object.
* If an error occurred, an error object.
*
* @param rowCount
* The number of rows emitted as result of executing the SQL statement.
Expand Down Expand Up @@ -123,7 +123,7 @@ class Request extends EventEmitter {

/**
* This event, describing result set columns, will be emitted before row
* events are emitted. This event may be emited multiple times when more
* events are emitted. This event may be emitted multiple times when more
* than one recordset is produced by the statement.
*
* An array like object, where the columns can be accessed either by index
Expand Down Expand Up @@ -173,7 +173,7 @@ class Request extends EventEmitter {
*
* This token is used to indicate the completion of a SQL statement.
* As multiple SQL statements can be sent to the server in a single SQL batch, multiple `done` can be generated.
* An `done` event is emited for each SQL statement in the SQL batch except variable declarations.
* An `done` event is emitted for each SQL statement in the SQL batch except variable declarations.
* For execution of SQL statements within stored procedures, `doneProc` and `doneInProc` events are used in place of `done`.
*
* If you are using [[Connection.execSql]] then SQL server may treat the multiple calls with the same query as a stored procedure.
Expand All @@ -191,7 +191,7 @@ class Request extends EventEmitter {
*
* @param rst
* Rows as a result of executing the SQL statement.
* Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
* Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
*/
(rowCount: number | undefined, more: boolean, rst?: any[]) => void
): this
Expand All @@ -216,7 +216,7 @@ class Request extends EventEmitter {
*
* @param rst
* Rows as a result of executing the SQL statement.
* Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
* Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
*/
(rowCount: number | undefined, more: boolean, rst?: any[]) => void
): this
Expand All @@ -238,7 +238,7 @@ class Request extends EventEmitter {
*
* @param rst
* Rows as a result of executing the SQL statement.
* Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
* Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`.
*/
(rowCount: number | undefined, more: boolean, procReturnStatusValue: number, rst?: any[]) => void
): this
Expand Down
2 changes: 1 addition & 1 deletion src/value-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ function readVariant(buf: Buffer, offset: number, options: ParserOptions, dataLe
// maxLength (unused?)
({ offset } = readUInt16LE(buf, offset));

// collation (unsued?)
// collation (unused?)
({ offset } = readCollation(buf, offset));

return readNChars(buf, offset, dataLength);
Expand Down