From 855699d97f8dd1cbf42ae3795a8841c192ac4b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Avic=20Simmons?= Date: Mon, 22 Jun 2026 12:05:30 -0400 Subject: [PATCH] docs: fix 20 typos and grammar errors in comments and error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix misspellings (instanciate → instantiate, dependancy → dependency, CLass → Class, Excepted → Expected, eject → reject, in stance → instance), grammar (serializer → serializers, doesn't → don't, Module → Modules, javascript primitive → JavaScript primitives, register → registered), and capitalization issues across 5 source files. No functional changes except correcting 'Excepted' → 'Expected' in a TypeError message and 'Modules are' in a console.error string. --- packages/coriolis/src/Coriolis.ts | 2 +- packages/coriolis/src/DataSerializer.ts | 12 ++++++------ packages/coriolis/src/ModuleLoader.ts | 2 +- packages/coriolis/src/module/LoaderUtilModule.ts | 4 ++-- packages/coriolis/src/module/PluginModule.ts | 14 +++++++------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/coriolis/src/Coriolis.ts b/packages/coriolis/src/Coriolis.ts index f7a690a9..ba923d66 100644 --- a/packages/coriolis/src/Coriolis.ts +++ b/packages/coriolis/src/Coriolis.ts @@ -132,7 +132,7 @@ export class Coriolis extends PostMessageChannel { initialContent: string, ) { if (!(target instanceof HTMLElement)) { - throw new TypeError('Excepted to have a HTMLElement object'); + throw new TypeError('Expected to have a HTMLElement object'); } let url; diff --git a/packages/coriolis/src/DataSerializer.ts b/packages/coriolis/src/DataSerializer.ts index 79103e3c..d8895b57 100644 --- a/packages/coriolis/src/DataSerializer.ts +++ b/packages/coriolis/src/DataSerializer.ts @@ -19,16 +19,16 @@ import {SerializerBase} from './SerializerBase'; /** * A class that handles the stringification and parsing of the data that will be sent through PostMessage. * This has two main differences with JSON.parse/JSON.stringify. - * - It allows loading custom domain serializer that could be loaded dynamically + * - It allows loading custom domain serializers that could be loaded dynamically * - It excludes from serialization all the property of objects which start with an "_" (underscore) - * This allows having more than javascript primitive to be serialized and also to keep some property to be + * This allows having more than JavaScript primitives to be serialized and also to keep some property to be * transferred because they shouldn't or they technically can't be transferred. For example, a security * token might not be transferred or an HTMLElement reference couldn't be technically transferred. In that * case, it could still be interesting to use it in a store but you never want them to be transferred. */ export class DataSerializer { /** - * Internal array to save all custom serializer we have register + * Internal array to save all custom serializers we have registered * @type {Map} */ private _serializers = new Map(); @@ -66,7 +66,7 @@ export class DataSerializer { // eslint-disable-next-line @typescript-eslint/no-this-alias const myThis = this; // can't use closure since we need the JSON.stringify this return JSON.stringify(obj, function (k, v) { - // typeof => eject number and things that doesn't have match function + // typeof => reject number and things that don't have match function if (k !== '_serializerKey' && typeof k === 'string' && k.match(/^_/)) { return undefined; } @@ -77,7 +77,7 @@ export class DataSerializer { } /** - * Call all custom serializer + * Call all custom serializers * @param {Object} obj Object to serialize * @param {any} [fallback] Default value if we can't find a dataSerializer for it * @return {Object|any} The value after the custom serializer or fallback @@ -112,7 +112,7 @@ export class DataSerializer { } /** - * Call all custom serializer + * Call all custom serializers * @param {any} obj The current parse value * @return {any} The value after the custom parse or the input obj */ diff --git a/packages/coriolis/src/ModuleLoader.ts b/packages/coriolis/src/ModuleLoader.ts index ae8a4465..adc210d3 100644 --- a/packages/coriolis/src/ModuleLoader.ts +++ b/packages/coriolis/src/ModuleLoader.ts @@ -55,7 +55,7 @@ export class ModuleLoader /** * Add a module * @param {string} name The name of the module - * @param {Class} Module A module class to instanciate + * @param {Class} Module A module class to instantiate * @param {Object} config The configuration to pass to the module * @param {Boolean} alias If the module is directly available in postMessage class * @return {boolean} return if the module is correctly added diff --git a/packages/coriolis/src/module/LoaderUtilModule.ts b/packages/coriolis/src/module/LoaderUtilModule.ts index e634389b..06019381 100644 --- a/packages/coriolis/src/module/LoaderUtilModule.ts +++ b/packages/coriolis/src/module/LoaderUtilModule.ts @@ -23,7 +23,7 @@ import {ModuleBase} from '../ModuleBase'; */ export class LoaderUtilModule extends ModuleBase { /** - * Internal array to save all custom serializer we have register + * Internal array to save all custom serializers we have registered * @type {Map} */ private _remoteModule = new Set(); @@ -88,7 +88,7 @@ export class LoaderUtilModule extends ModuleBase { if (!this._moduleAreSame()) { console.error( - 'Module are not in sync between the two frames.', + 'Modules are not in sync between the two frames.', this.loaded(), ); } diff --git a/packages/coriolis/src/module/PluginModule.ts b/packages/coriolis/src/module/PluginModule.ts index 9e1dbf35..02ce2835 100644 --- a/packages/coriolis/src/module/PluginModule.ts +++ b/packages/coriolis/src/module/PluginModule.ts @@ -40,7 +40,7 @@ export class PluginModule extends ModuleBase { } /** - * Register a set of plugin and solve the dependancy + * Register a set of plugin and solve the dependency * @param {Object} plugins Class of each plugins with their respective names in keys * @return {void} */ @@ -64,8 +64,8 @@ export class PluginModule extends ModuleBase { /** * Add one plugin with his name and his class * @param {String} name The plugin name/key - * @param {CLass} plugin Class of the plugin to instanciate - * @return {Boolean} If the plugin was added and instanciate or false if it's already present + * @param {Class} plugin Class of the plugin to instantiate + * @return {Boolean} If the plugin was added and instantiated or false if it's already present */ add(name: string, plugin: Object) { if (this._plugins.has(name)) { @@ -77,7 +77,7 @@ export class PluginModule extends ModuleBase { } /** - * Get the in stance of a plugin + * Get the instance of a plugin * @param {String} name The name of the plugin to get * @return {Object} The instance of the plugin */ @@ -95,9 +95,9 @@ export class PluginModule extends ModuleBase { } /** - * Instanciate the plugin (with custom plugin factory if it was registered) - * @param {String} name Plugin name/key to instanciate - * @return {Boolean} If the plugin was instanciate + * Instantiate the plugin (with custom plugin factory if it was registered) + * @param {String} name Plugin name/key to instantiate + * @return {Boolean} If the plugin was instantiated */ private _init(name: string) { const plugin = this._plugins.get(name);