From fb6abfb0fa866791eb212a13fddab29911c6546f Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Thu, 24 Aug 2023 07:09:02 -0700 Subject: [PATCH] Run spell checker. --- misc/decorators.ts | 2 +- misc/godot.d.ts | 4 ++-- tests/UnitTest.js.disabled | 16 ++++++++-------- thirdparty/quickjs/quickjs_binder.cpp | 2 +- tools/editor_tools.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/misc/decorators.ts b/misc/decorators.ts index 560383f9..dc2bc9ff 100644 --- a/misc/decorators.ts +++ b/misc/decorators.ts @@ -1,6 +1,6 @@ /** * Expose as a godot class. - * An class object is created and attached automaticly when construct an instance from this class + * An class object is created and attached automatically when construct an instance from this class */ export function gdclass(target: new() => T) { const id = gdclass['internal_class_id'] = gdclass['internal_class_id'] ? gdclass['internal_class_id'] + 1 : 1; diff --git a/misc/godot.d.ts b/misc/godot.d.ts index 26a5326c..5066a2b1 100644 --- a/misc/godot.d.ts +++ b/misc/godot.d.ts @@ -56,7 +56,7 @@ declare module globalThis { * * Workers run in another global context that is different from the current context. * - * You can run whatever code you like inside the worker thread. All of the godot API are avaliable inside workers. + * You can run whatever code you like inside the worker thread. All of the godot API are available inside workers. * * Data is sent between workers and the main thread via a system of messages — both sides send their messages using the `postMessage()` method, and respond to messages via the `onmessage` event handler (the message is contained within the Message event's data attribute.) The data is copied rather than shared. * @@ -81,7 +81,7 @@ declare module globalThis { /** * Sends a message to the worker's inner scope. This accepts a single parameter, which is the data to send to the worker. * @param message The object to deliver to the worker; this will be in the data field in the event delivered to the `onmessage` handler. - * @note The data cannot be instance of `godot.Object` or any other JavaScript object conains functions. + * @note The data cannot be instance of `godot.Object` or any other JavaScript object contains functions. */ postMessage(message: any): void; diff --git a/tests/UnitTest.js.disabled b/tests/UnitTest.js.disabled index c9699d38..57773554 100644 --- a/tests/UnitTest.js.disabled +++ b/tests/UnitTest.js.disabled @@ -29,7 +29,7 @@ test('Object.prototype.connect', () => { let obj = new godot.Object(); obj.connect('script_changed', (...args)=> { - console.log(`signal 'script_changed' emited with:`, ...args); + console.log(`signal 'script_changed' emitted with:`, ...args); ok = true; }); obj.emit_signal('script_changed', 123, 'hello'); @@ -39,19 +39,19 @@ test('Object.prototype.connect', () => { // --------------------------- Unit Test Implementation ------------------------ -function test(description, blcok, group = 'default') { +function test(description, block, group = 'default') { const entries = TEST_ENTRIES.get(group) || []; - entries.push({ description, blcok }); + entries.push({ description, block }); TEST_ENTRIES.set(group, entries); } function runEntry(entry) { return new Promise((resolve, reject) => { - switch (typeof (entry.blcok)) { + switch (typeof (entry.block)) { case 'boolean': - return resolve(entry.blcok); + return resolve(entry.block); case 'function': { try { - resolve(entry.blcok()); + resolve(entry.block()); } catch (error) { console.error(error); resolve(false); @@ -59,8 +59,8 @@ function runEntry(entry) { } break; case 'object': - if (entry.blcok instanceof Promise) { - entry.blcok.then(() => { + if (entry.block instanceof Promise) { + entry.block.then(() => { resolve(true); }).catch(err => { resolve(false); diff --git a/thirdparty/quickjs/quickjs_binder.cpp b/thirdparty/quickjs/quickjs_binder.cpp index 35b54985..20a7e687 100644 --- a/thirdparty/quickjs/quickjs_binder.cpp +++ b/thirdparty/quickjs/quickjs_binder.cpp @@ -686,7 +686,7 @@ JSModuleDef *QuickJSBinder::js_module_loader(JSContext *ctx, const char *module_ module.hash = hash_var.hash(); module.module = m; module.res = res; - module.res->reference(); // Avoid auto release as module don't release automaticly + module.res->reference(); // Avoid auto release as module don't release automatically module.res_value = val; module.flags = MODULE_FLAG_RESOURCE; module.module = m; diff --git a/tools/editor_tools.cpp b/tools/editor_tools.cpp index 06294b1c..cc443f23 100644 --- a/tools/editor_tools.cpp +++ b/tools/editor_tools.cpp @@ -680,7 +680,7 @@ void JavaScriptPlugin::_export_typescript_declare_file(const String &p_path) { void JavaScriptPlugin::_export_enumeration_binding_file(const String &p_path) { _export_typescript_declare_file(""); - String file_content = "// Tool generated file DO NOT modify mannually\n" + String file_content = "// Tool generated file DO NOT modify manually\n" "// Add this script as first autoload to your project to bind enumerations for release build of godot engine\n" "\n" "if (!godot.DEBUG_ENABLED) {\n"