Skip to content

Commit

Permalink
fix: more typo fixes (#4842)
Browse files Browse the repository at this point in the history
Co-authored-by: luz paz <luzpaz@github.com>
  • Loading branch information
luzpaz and luz paz committed Jul 26, 2022
1 parent 73c3798 commit 07e444a
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/config-files/file-format.md
Expand Up @@ -14,7 +14,7 @@ The following properties are defined and should always be present in the same or
| `associations` | The association groups the device supports, [see below](#associations) for details. Only needs to be present if the device does not support Z-Wave+ or requires changes to the default association config. |
| `paramInformation` | An array of the configuration parameters the device supports. [See below](#paramInformation) for details. |
| `proprietary` | A dictionary of settings for the proprietary CC. The settings depend on each proprietary CC implementation. |
| `compat` | Compatibility flags used to influence the communication with non-complient devices. [See below](#compat) for details. |
| `compat` | Compatibility flags used to influence the communication with non-compliant devices. [See below](#compat) for details. |
| `metadata` | Metadata that is intended to help the user, like inclusion instructions etc. [See below](#metadata) for details. |

## `devices`
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/migrating-to-v10.md
Expand Up @@ -11,7 +11,7 @@ The implementations of serial messages and Command Classes have been decoupled f
- `IVirtualEndpoint` - A barebones abstraction of an endpoint on a virtual (multicast, broadcast) node
- `IVirtualNode` - A barebones abstraction of a virtual (multicast, broadcast) node. Similar to how `VirtualNode` is a `VirtualEndpoint`, an `IVirtualNode` is an `IVirtualEndpoint`

These abstractions are mainly used internally. Object instances exposed to applications throught the `Driver` will still be `ZWaveNode`s and `Endpoint`s.
These abstractions are mainly used internally. Object instances exposed to applications through the `Driver` will still be `ZWaveNode`s and `Endpoint`s.

For many use cases, these changes should not affect applications, unless they are using some CC methods directly. The `commandClasses` APIs are unchanged.

Expand Down
2 changes: 1 addition & 1 deletion packages/config/config/indicators.json
Expand Up @@ -133,7 +133,7 @@
},
"0x05": {
"label": "On/Off Period: On time",
"description": "This property is used to set the length of the On time during an On/Off period. It allows asymetic On/Off periods. The value 0x00 MUST represent symmetric On/Off period (On time equal to Off time)"
"description": "This property is used to set the length of the On time during an On/Off period. It allows asymmetric On/Off periods. The value 0x00 MUST represent symmetric On/Off period (On time equal to Off time)"
},
"0x0a": {
"label": "Timeout: Hours",
Expand Down
8 changes: 4 additions & 4 deletions packages/config/maintenance/importConfig.ts
Expand Up @@ -590,7 +590,7 @@ async function parseOZWProduct(
manufacturer,
manufacturerId: manufacturerIdHex,
label: productLabel,
description: existingDevice?.description ?? productName, // don't override the descrition
description: existingDevice?.description ?? productName, // don't override the description
devices: devices,
firmwareVersion: {
min: existingDevice?.firmwareVersion.min ?? "0.0",
Expand Down Expand Up @@ -1049,7 +1049,7 @@ function combineDeviceFiles(json: Record<string, any>[]) {
);
}
// Show an error if the device parameters should match, but they don't
// TODO add erorr handling if a FW changes parameters
// TODO add error handling if a FW changes parameters
else if (
test_file.ProductId === file.ProductId &&
test_file.ProductTypeId === file.ProductTypeId &&
Expand All @@ -1060,7 +1060,7 @@ function combineDeviceFiles(json: Record<string, any>[]) {
) == false
) {
console.log(
`WARNING - Detected possible firmware parameter change ${file.Identifer} -- ${file.Id} and ${test_file.Id}`,
`WARNING - Detected possible firmware parameter change ${file.Identifier} -- ${file.Id} and ${test_file.Id}`,
);
}
// We were wrong to change the identifier because the params don't match, restore the tested file as it is different
Expand Down Expand Up @@ -1289,7 +1289,7 @@ async function parseZWAProduct(
manufacturer,
manufacturerId: manufacturerIdHex,
label: productLabel,
description: existingDevice?.description ?? productName, // don't override the descrition
description: existingDevice?.description ?? productName, // don't override the description
devices: devices,
firmwareVersion: {
min: existingDevice?.firmwareVersion.min ?? "0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/maintenance/lintConfigFiles.ts
Expand Up @@ -1085,7 +1085,7 @@ Consider converting this parameter to unsigned using ${white(
addError(
entry.filename,
`Duplicate config file detected for device (manufacturer id = ${entry.manufacturerId}, product type = ${entry.productType}, product id = ${entry.productId})
The first occurence of this device is in file config/devices/${index[firstIndex].filename}`,
The first occurrence of this device is in file config/devices/${index[firstIndex].filename}`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/error/ZWaveError.ts
Expand Up @@ -131,7 +131,7 @@ export enum ZWaveErrorCodes {
SupervisionCC_CommandFailed = 1100,

/**
* Used to report that a ManufacturerProprietaryCC could not be instanciated
* Used to report that a ManufacturerProprietaryCC could not be instantiated
* because of a missing manufacturer ID.
*/
ManufacturerProprietaryCC_NoManufacturerId = 1200,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/values/Metadata.ts
Expand Up @@ -69,7 +69,7 @@ export interface ValueMetadataAny {
}

/**
* Helper function to define metadata templates while checking that they satify a constraint.
* Helper function to define metadata templates while checking that they satisfy a constraint.
*/
// TODO: Revisit this when https://github.com/microsoft/TypeScript/issues/47920 is solved
const define =
Expand Down
2 changes: 1 addition & 1 deletion packages/host/src/ZWaveHost.ts
Expand Up @@ -62,7 +62,7 @@ export interface ZWaveHost {
): void;

/**
* Returns the next callback ID. Callback IDs are used to correllate requests
* Returns the next callback ID. Callback IDs are used to correlate requests
* to the controller/nodes with its response
*/
getNextCallbackId(): number;
Expand Down
4 changes: 2 additions & 2 deletions packages/maintenance/src/codefind.ts
Expand Up @@ -290,7 +290,7 @@ export function codefind(query: CodeFindQuery): Result[] {
for (const [, node] of searchNodes) {
const text = node.getText(sourceFile);
if (typeof query.search === "string") {
// Find all occurences of simple strings in the node
// Find all occurrences of simple strings in the node
let startIndex = 0;
let foundIndex = -1;
while (
Expand Down Expand Up @@ -324,7 +324,7 @@ export function codefind(query: CodeFindQuery): Result[] {
startIndex = foundIndex + query.search.length;
}
} else {
// Find all occurences of regex in the node
// Find all occurrences of regex in the node
const matches = text.matchAll(query.search);
for (const match of matches) {
const matchPosition =
Expand Down
2 changes: 1 addition & 1 deletion packages/maintenance/src/lintForbiddenImports.ts
Expand Up @@ -83,7 +83,7 @@ function getImports(
ts.forEachChild(sourceFile, (node) => {
// Vist top-level import nodes
const moduleNameExpr = getExternalModuleName(node);
// if they have a name, that is a string, i.e. not alias defition `import x = y`
// if they have a name, that is a string, i.e. not alias definition `import x = y`
if (
moduleNameExpr &&
moduleNameExpr.kind === ts.SyntaxKind.StringLiteral
Expand Down
2 changes: 1 addition & 1 deletion packages/maintenance/src/lintNoExternalImports.ts
Expand Up @@ -83,7 +83,7 @@ function getImports(
ts.forEachChild(sourceFile, (node) => {
// Vist top-level import nodes
const moduleNameExpr = getExternalModuleName(node);
// if they have a name, that is a string, i.e. not alias defition `import x = y`
// if they have a name, that is a string, i.e. not alias definition `import x = y`
if (
moduleNameExpr &&
moduleNameExpr.kind === ts.SyntaxKind.StringLiteral
Expand Down
Expand Up @@ -61,7 +61,7 @@ function visitUnionOrIntersectionType(
}
} else {
if (stringTypes.some((stringType) => stringType === false)) {
// If T or U is not assignable to stirng, then T & U is not assignable to string.
// If T or U is not assignable to string, then T & U is not assignable to string.
return false;
}
if (stringTypes.some((stringType) => stringType !== true)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/controller/Inclusion.ts
Expand Up @@ -35,7 +35,7 @@ export enum InclusionStrategy {
*
* Issues a warning if Security S0 is not supported or the secure bootstrapping fails.
*
* **Not recommended** because S0 should be used sparingly and S2 preferred whereever possible.
* **Not recommended** because S0 should be used sparingly and S2 preferred wherever possible.
*/
Security_S0,
/**
Expand Down
Expand Up @@ -10,7 +10,7 @@ describe("protocolVersionToSDKVersion", () => {
expect(protocolVersionToSDKVersion("8.99")).toBe("8.99");
});

it("ensures a non-existant version is at least parsable with semver", () => {
it("ensures a non-existent version is at least parsable with semver", () => {
expect(protocolVersionToSDKVersion("99.01")).toBe("99.1");
});

Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/driver/CommandQueueMachine.ts
Expand Up @@ -60,7 +60,7 @@ export type CommandQueueEvent =
| { type: "message"; message: Message }
| { type: "unsolicited"; message: Message }
| { type: "remove"; transaction: Transaction } // Used to abort the given transaction and remove it from the command queue
| { type: "command_error"; error: Error } // An unexpected error occured during command execution
| { type: "command_error"; error: Error } // An unexpected error occurred during command execution
| ({ type: "command_success" } & Omit<
CommandQueueDoneData & { type: "success" },
"type"
Expand Down
4 changes: 2 additions & 2 deletions packages/zwave-js/src/lib/driver/Driver.ts
Expand Up @@ -832,7 +832,7 @@ export class Driver
if (this.serial.isOpen) await this.serial.close();

// IMPORTANT: Test code expects the open promise to be created and returned synchronously
// Everything async (inluding opening the serial port) must happen in the setImmediate callback
// Everything async (including opening the serial port) must happen in the setImmediate callback

// asynchronously open the serial port
setImmediate(async () => {
Expand Down Expand Up @@ -3356,7 +3356,7 @@ ${handlers.length} left`,

private lastCallbackId = 0xff;
/**
* Returns the next callback ID. Callback IDs are used to correllate requests
* Returns the next callback ID. Callback IDs are used to correlate requests
* to the controller/nodes with its response
*/
public getNextCallbackId(): number {
Expand Down
4 changes: 2 additions & 2 deletions packages/zwave-js/src/lib/driver/MessageGenerators.ts
Expand Up @@ -273,7 +273,7 @@ export const secureMessageGeneratorS2: MessageGeneratorImplementation =
message: `failed to decode the message, retrying with SPAN extension...`,
direction: "none",
});
// Prepare the messsage for re-transmission
// Prepare the message for re-transmission
msg.callbackId = undefined;
msg.command.unsetSequenceNumber();

Expand Down Expand Up @@ -325,7 +325,7 @@ export function createMessageGenerator<TResponse extends Message = Message>(
};

async function* gen() {
// Determine which message generator implemenation should be used
// Determine which message generator implementation should be used
let implementation: MessageGeneratorImplementation =
simpleMessageGenerator;
if (isSendData(msg)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/driver/Transaction.ts
Expand Up @@ -34,7 +34,7 @@ export interface TransactionOptions {
}

/**
* Transactions are used to track and correllate messages with their responses.
* Transactions are used to track and correlate messages with their responses.
*/
export class Transaction implements Comparable<Transaction> {
public constructor(
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/log/Driver.ts
Expand Up @@ -189,7 +189,7 @@ export class DriverLogger extends ZWaveLoggerBase<DriverLogContext> {
}
}

/** Logs whats currently in the driver's send queue */
/** Logs what's currently in the driver's send queue */
public sendQueue(queue: SortedList<Transaction>): void {
if (!this.isSendQueueLogVisible()) return;

Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/node/Endpoint.ts
Expand Up @@ -411,7 +411,7 @@ export class Endpoint implements IZWaveEndpoint {
}.bind(this);

/**
* Provides access to simplified APIs that are taylored to specific CCs.
* Provides access to simplified APIs that are tailored to specific CCs.
* Make sure to check support of each API using `API.isSupported()` since
* all other API calls will throw if the API is not supported
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/node/Node.test.ts
Expand Up @@ -1856,7 +1856,7 @@ describe("lib/node/Node", () => {
},
true,
);
// The endpoint suppports Binary Switch
// The endpoint supports Binary Switch
node.getEndpoint(1)?.addCC(CommandClasses["Binary Switch"], {
isSupported: true,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/node/Node.ts
Expand Up @@ -1426,7 +1426,7 @@ protocol version: ${this.protocolVersion}`;
// Assume that sleeping nodes start asleep
if (this.canSleep) {
if (this.status === NodeStatus.Alive) {
// unless it was just inluded and is currently communicating with us
// unless it was just included and is currently communicating with us
// In that case we need to switch from alive/dead to awake/asleep
this.markAsAwake();
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/node/VirtualEndpoint.ts
Expand Up @@ -169,7 +169,7 @@ export class VirtualEndpoint implements IVirtualEndpoint {
}.bind(this);

/**
* Provides access to simplified APIs that are taylored to specific CCs.
* Provides access to simplified APIs that are tailored to specific CCs.
* Make sure to check support of each API using `API.isSupported()` since
* all other API calls will throw if the API is not supported
*/
Expand Down
Expand Up @@ -30,7 +30,7 @@ export enum ApplicationCommandStatusFlags {

Explore = 0b10000, // Received an explore frame

ForeignFrame = 0b0100_0000, // Received a foreign frame (only promiscous mode)
ForeignFrame = 0b0100_0000, // Received a foreign frame (only promiscuous mode)
ForeignHomeId = 0b1000_0000, // The received frame is received from a foreign HomeID. Only Controllers in Smart Start AddNode mode can receive this status.
}

Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/test/mocks.ts
Expand Up @@ -256,7 +256,7 @@ export function createTestNode(
},

getEndpoint: ((index: number) => {
// When the endpoint count is known, return undefined for non-existant endpoints
// When the endpoint count is known, return undefined for non-existent endpoints
if (
options.numEndpoints != undefined &&
index > options.numEndpoints
Expand Down

0 comments on commit 07e444a

Please sign in to comment.