Skip to content

Commit feade78

Browse files
ryoppippisamchon
andauthored
fix spelling ci & fix typo (#1481)
* chore: add typos config * chore: add typos dictionary * chore: spell-check ci * feat(typos): ignore pattern https://github.com/crate-ci/typos/blob/0fad3ddc6e0fedf679217dcc61886fbeabd09346/docs/reference.md#example-configurations * chore(README): fix spelling * chore(website): fix spelling * chore(test-error): fix spelling * chore(test): fix typo * chore(benckmark): fix spelling * chore(src): fix spelling * chore(test): fix spelling shrinked -> shrunk * chore(website): secretly -> secret * chore(website): key -> keys * Revert "chore(website): key -> keys" This reverts commit 36374b6. * Revert "chore(website): secretly -> secret" This reverts commit 547b9e9. * chore(website): secretly key -> security keys * chore(src): secretly key -> security keys * Make test program to be passed * Add extend-exclude * Fix extend-exclude * Fix some keywords --------- Co-authored-by: Jeongho Nam <samchon.github@gmail.com>
1 parent 0cef0e1 commit feade78

File tree

142 files changed

+906
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+906
-728
lines changed

.github/workflows/spell-check.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: spell-check
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
spell-check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v4
12+
13+
- uses: crate-ci/typos@master
14+
with:
15+
config: ./typos.toml

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Also, `typia` is re-distributing half of donations to core contributors of `typi
9595
- [`nonara/ts-patch`](https://github.com/nonara/ts-patch)
9696
- [`ryoppippi/unplugin-typia`](https://github.com/ryoppippi/unplugin-typia)
9797

98-
[![Sponsers](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
98+
[![Sponsors](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
9999

100100

101101

benchmark/src/internal/BenchmarkServer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export namespace BenchmarkServer {
3434
console.log("---------------------------------------------------");
3535

3636
const location: string = `${__dirname}/../programs/${category}`;
37-
const libraries: string[] = await findLibaries(location);
37+
const libraries: string[] = await findLibraries(location);
3838
const types: string[] = await findTypes(
3939
libraries.map((str) => `${location}/${str}`),
4040
);
@@ -130,14 +130,14 @@ export namespace BenchmarkServer {
130130
return (await tolerable()) ? controller.failure(data) : null;
131131
};
132132

133-
async function findLibaries(path: string): Promise<string[]> {
133+
async function findLibraries(path: string): Promise<string[]> {
134134
const directory: string[] = [];
135135
for (const file of await fs.promises.readdir(path)) {
136136
if (file === "internal") continue;
137137
const stats: fs.Stats = await fs.promises.stat(`${path}/${file}`);
138138
if (stats.isDirectory()) directory.push(file);
139139
}
140-
const index = (str: string) => LIBARIES.findIndex((s) => s === str);
140+
const index = (str: string) => LIBRARIES.findIndex((s) => s === str);
141141
return directory.sort((x, y) => index(x) - index(y));
142142
}
143143

@@ -174,7 +174,7 @@ export namespace BenchmarkServer {
174174
ArrayRecursiveUnionImplicit: ArrayRecursiveUnionImplicit,
175175
UltimateUnion: UltimateUnion,
176176
};
177-
const LIBARIES: string[] = [
177+
const LIBRARIES: string[] = [
178178
"typia",
179179
"typebox",
180180
"ajv",

benchmark/src/programs/assert-error/io-ts/createAssertErrorIoTsBenchmarkProgram.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { IoTsUtils } from "../../../structures/io-ts/IoTsUtils";
44
import { createAssertErrorBenchmarkProgram } from "../createAssertErrorBenchmarkProgram";
55

66
export const createAssertErrorIoTsBenchmarkProgram = <Schema extends Mixed>(
7-
instace: Schema,
7+
instance: Schema,
88
) => {
9-
const schema = array(instace);
9+
const schema = array(instance);
1010
return createAssertErrorBenchmarkProgram((input) => {
1111
if (schema.is(input) === false) {
1212
const validation: Validation<any> = schema.decode(input);

benchmark/src/programs/createSuccessBenchmarkProgram.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import tgrid from "tgrid";
44
import { IBenchmarkProgram } from "./IBenchmarkProgram";
55

66
export const createSuccessBenchmarkProgram =
7-
(multipler: number) =>
7+
(multiplier: number) =>
88
<T>(process: (input: T) => any) =>
99
async (validate: (input: T) => boolean, skip?: (name: string) => boolean) => {
1010
const provider: IBenchmarkProgram<T> = {
@@ -17,7 +17,7 @@ export const createSuccessBenchmarkProgram =
1717
return suite.map((elem: benchmark) => {
1818
const count: number = elem.hz * elem.times.elapsed;
1919
const size: number =
20-
multipler * Buffer.from(JSON.stringify(input)).byteLength;
20+
multiplier * Buffer.from(JSON.stringify(input)).byteLength;
2121

2222
return {
2323
amount: size * count,

benchmark/src/programs/validate-error/io-ts/createValidateErrorIoTsBenchmarkProgram.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { IoTsUtils } from "../../../structures/io-ts/IoTsUtils";
44
import { createValidateErrorBenchmarkProgram } from "../createValidateErrorBenchmarkProgram";
55

66
export const createValidateErrorIoTsBenchmarkProgram = <Schema extends Mixed>(
7-
instace: Schema,
7+
instance: Schema,
88
) => {
9-
const schema = array(instace);
9+
const schema = array(instance);
1010
return createValidateErrorBenchmarkProgram((input) => {
1111
if (schema.is(input) === true) return [];
1212
const validation: Validation<any> = schema.decode(input);

benchmark/src/structures/class-validator/ClassValidatorArrayHierarchical.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Employee {
2121
@cv.ValidateNested()
2222
@cv.IsObject()
2323
@tr.Type(() => ClassValidatorTimestamp)
24-
employeed_at!: ClassValidatorTimestamp;
24+
employed_at!: ClassValidatorTimestamp;
2525
}
2626

2727
class Department {

benchmark/src/structures/pure/ArrayHierarchical.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export namespace ArrayHierarchical {
2222
name: string;
2323
age: number;
2424
grade: number;
25-
employeed_at: ITimestamp;
25+
employed_at: ITimestamp;
2626
}
2727
export interface ITimestamp {
2828
time: number;
@@ -51,7 +51,7 @@ export namespace ArrayHierarchical {
5151
name: TestRandomGenerator.string(),
5252
age: TestRandomGenerator.integer(),
5353
grade: TestRandomGenerator.integer(),
54-
employeed_at: {
54+
employed_at: {
5555
time: TestRandomGenerator.integer(),
5656
zone: TestRandomGenerator.integer(),
5757
},
@@ -92,7 +92,7 @@ export namespace ArrayHierarchical {
9292
"$input[0].departments[0].employees[0].name",
9393
"$input[0].departments[0].employees[0].age",
9494
"$input[0].departments[0].employees[0].grade",
95-
"$input[0].departments[0].employees[0].employeed_at",
95+
"$input[0].departments[0].employees[0].employed_at",
9696
];
9797
},
9898
];

benchmark/src/structures/pure/ObjectHierarchical.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export namespace ObjectHierarchical {
5151

5252
export function generate(
5353
authorized: boolean = true,
54-
employeed: boolean = true,
54+
employed: boolean = true,
5555
): ObjectHierarchical {
5656
const account = authorized ? () => generate_account() : () => null;
57-
const enterprise: IEnterprise | null = employeed
57+
const enterprise: IEnterprise | null = employed
5858
? {
5959
id: TestRandomGenerator.integer(),
6060
account: generate_account(),

benchmark/src/structures/typebox/TypeboxArrayHierarchical.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Employee = Type.Object({
1212
name: Type.String(),
1313
age: Type.Number(),
1414
grade: Type.Number(),
15-
employeed_at: Timestamp,
15+
employed_at: Timestamp,
1616
});
1717

1818
const Department = Type.Object({

benchmark/src/utils/TestRandomGenerator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export namespace TestRandomGenerator {
5656
export const length = () => integer(0, 3);
5757

5858
/* -----------------------------------------------------------
59-
SECIAL FORMATS
59+
SPECIAL FORMATS
6060
----------------------------------------------------------- */
6161
export const uuid = () =>
6262
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {

packages/typescript-json/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Also, `typia` is re-distributing half of donations to core contributors of `typi
9898
- [`nonara/ts-patch`](https://github.com/nonara/ts-patch)
9999
- [`ryoppippi/unplugin-typia`](https://github.com/ryoppippi/unplugin-typia)
100100

101-
[![Sponsers](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
101+
[![Sponsors](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
102102

103103

104104

src/IReadableURLSearchParams.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Interface for a readable URLSearchParams object.
33
*
44
* This interface is a subset of the {@link URLSearchParams} interface,
5-
* designed especially for the [Hono.JS](https://hono.dev/) libray.
5+
* designed especially for the [Hono.JS](https://hono.dev/) library.
66
*
77
* @author https://github.com/miyaji255
88
*/

src/factories/MetadataTypeTagFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export namespace MetadataTypeTagFactory {
152152
if (tag.target !== props.type) {
153153
success &&= props.report({
154154
property: null,
155-
message: `target must constains ${props.type} type`,
155+
message: `target must contain ${props.type} type`,
156156
});
157157
}
158158

src/factories/ProtobufFactory.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -409,14 +409,14 @@ export namespace ProtobufFactory {
409409
);
410410
}
411411
//----
412-
// ARRRAY CASES
412+
// ARRAY CASES
413413
//----
414-
// DO NOT ALLOW MULTI-DIMENTIONAL ARRAY
414+
// DO NOT ALLOW MULTI-DIMENSIONAL ARRAY
415415
if (
416416
meta.arrays.length &&
417417
meta.arrays.some((array) => !!array.type.value.arrays.length)
418418
)
419-
noSupport("over two dimenstional array type");
419+
noSupport("over two dimensional array type");
420420
// CHILD OF ARRAY TYPE MUST BE REQUIRED
421421
if (
422422
meta.arrays.length &&
@@ -494,7 +494,7 @@ export namespace ProtobufFactory {
494494
meta.objects[0]!.type.properties.some((p) => !!p.value.arrays.length)
495495
)
496496
noSupport("dynamic object with array value type");
497-
// UNION WITH DYNAMIC OBJECTa
497+
// UNION WITH DYNAMIC OBJECTTa
498498
if (
499499
meta.size() > 1 &&
500500
meta.objects.length &&

src/factories/internal/metadata/iterate_metadata_intersection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const iterate_metadata_intersection = (
1616
if (props.intersected === true) return false;
1717
else if (props.type.isIntersection() === false) return false;
1818

19-
// COSTRUCT FAKE METADATA LIST
19+
// CONSTRUCT FAKE METADATA LIST
2020
const commit: MetadataCollection = props.collection.clone();
2121
props.collection["options"] = undefined;
2222

src/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ export function validateHeaders(): never {
592592
* URL path parameter decoder.
593593
*
594594
* `typia.http.parameter()` is a function decoding a path parameter, with automatic
595-
* type casting to the expected type. When type `T` has beeen defined as `boolean` or
595+
* type casting to the expected type. When type `T` has been defined as `boolean` or
596596
* `number` type, `typia.http.parameter()` will cast the value to the expected type.
597597
*
598598
* Also, `typia.http.parameter()` performs type assertion to the decoded value by

src/internal/_isUniqueItems.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const _isUniqueItems = (elements: any[]): boolean => {
2-
// EMTPY OR ONLY ONE
2+
// EMPTY OR ONLY ONE
33
if (elements.length < 2) return true;
44

55
// SHALLOW COMPARISON

src/json.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export function application(): never {
174174
* Safe `JSON.parse()` function with type assertion.
175175
*
176176
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
177-
* {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
177+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation) string
178178
* to a `T` typed instance with type assertion.
179179
*
180180
* In such reason, when parsed JSON string value is not matched with the type `T`, it
@@ -197,7 +197,7 @@ export function assertParse(
197197
* Safe `JSON.parse()` function with type assertion.
198198
*
199199
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
200-
* {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
200+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation) string
201201
* to a `T` typed instance with type assertion.
202202
*
203203
* In such reason, when parsed JSON string value is not matched with the type `T`,
@@ -230,7 +230,7 @@ export function assertParse<T>(): Primitive<T> {
230230
* Safe `JSON.parse()` function with type checking.
231231
*
232232
* `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
233-
* Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
233+
* Therefore, it converts a JSON (JavaScript Object Notation) string to a `T` typed
234234
* instance with type checking.
235235
*
236236
* In such reason, when parsed JSON string value is not matched with the type `T`, it
@@ -249,7 +249,7 @@ export function isParse(input: string): never;
249249
* Safe `JSON.parse()` function with type checking.
250250
*
251251
* `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
252-
* Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
252+
* Therefore, it converts a JSON (JavaScript Object Notation) string to a `T` typed
253253
* instance with type checking.
254254
*
255255
* In such reason, when parsed JSON string value is not matched with the type `T`, it
@@ -277,7 +277,7 @@ export function isParse<T>(): Primitive<T> | null {
277277
* Safe `JSON.parse()` function with detailed type validation.
278278
*
279279
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
280-
* {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
280+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation) string
281281
* to a `T` typed instance with detailed type validation.
282282
*
283283
* In such reason, when parsed JSON string value is not matched with the type `T`, it
@@ -297,7 +297,7 @@ export function validateParse(input: string): never;
297297
* Safe `JSON.parse()` function with detailed type validation.
298298
*
299299
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
300-
* {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
300+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation) string
301301
* to a `T` typed instance with detailed type validation.
302302
*
303303
* In such reason, when parsed JSON string value is not matched with the type `T`, it

src/llm.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { ILlmApplicationOfValidate } from "./module";
2424
*
2525
* By the way, there can be some parameters (or their nested properties) which must be
2626
* composed by human, not by LLM. File uploading feature or some sensitive information
27-
* like secrety key (password) are the examples. In that case, you can separate the
27+
* like security keys (password) are the examples. In that case, you can separate the
2828
* function parameters to both LLM and human sides by configuring the
2929
* {@link ILlmApplicationOfValidate.IOptions.separate} property. The separated parameters
3030
* are assigned to the {@link ILlmFunctionOfValidate.separated} property.
@@ -85,7 +85,7 @@ export function applicationOfValidate(
8585
*
8686
* By the way, there can be some parameters (or their nested properties) which must be
8787
* composed by human, not by LLM. File uploading feature or some sensitive information
88-
* like secrety key (password) are the examples. In that case, you can separate the
88+
* like security keys (password) are the examples. In that case, you can separate the
8989
* function parameters to both LLM and human sides by configuring the
9090
* {@link ILlmApplicationOfValidate.IOptions.separate} property. The separated parameters
9191
* are assigned to the {@link ILlmFunctionOfValidate.separated} property.
@@ -155,7 +155,7 @@ export function applicationOfValidate(): never {
155155
*
156156
* By the way, there can be some parameters (or their nested properties) which must be
157157
* composed by human, not by LLM. File uploading feature or some sensitive information
158-
* like secrety key (password) are the examples. In that case, you can separate the
158+
* like security keys (password) are the examples. In that case, you can separate the
159159
* function parameters to both LLM and human sides by configuring the
160160
* {@link ILlmApplication.IOptions.separate} property. The separated parameters are
161161
* assigned to the {@link ILlmFunction.separated} property.
@@ -210,7 +210,7 @@ export function application(
210210
*
211211
* By the way, there can be some parameters (or their nested properties) which must be
212212
* composed by human, not by LLM. File uploading feature or some sensitive information
213-
* like secrety key (password) are the examples. In that case, you can separate the
213+
* like security keys (password) are the examples. In that case, you can separate the
214214
* function parameters to both LLM and human sides by configuring the
215215
* {@link ILlmApplication.IOptions.separate} property. The separated parameters are
216216
* assigned to the {@link ILlmFunction.separated} property.
@@ -385,8 +385,8 @@ export function parameters(): never {
385385
*
386386
* > **What LLM function calling is?
387387
* >
388-
* > LLM (Large Language Model) selects propert function and fill the arguments,
389-
* > but actuall function call execution is not by LLM, but by you.
388+
* > LLM (Large Language Model) selects property function and fill the arguments,
389+
* > but actual function call execution is not by LLM, but by you.
390390
* >
391391
* > In nowadays, most LLM (Large Language Model) like OpenAI are supporting
392392
* > "function calling" feature. The "function calling" means that LLM automatically selects
@@ -432,8 +432,8 @@ export function schema(): never;
432432
*
433433
* > **What LLM function calling is?
434434
* >
435-
* > LLM (Large Language Model) selects propert function and fill the arguments,
436-
* > but actuall function call execution is not by LLM, but by you.
435+
* > LLM (Large Language Model) selects property function and fill the arguments,
436+
* > but actual function call execution is not by LLM, but by you.
437437
* >
438438
* > In nowadays, most LLM (Large Language Model) like OpenAI are supporting
439439
* > "function calling" feature. The "function calling" means that LLM automatically selects

0 commit comments

Comments
 (0)