@simplysm/core-common 13.0.100 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/common.types.d.ts +14 -14
  2. package/dist/common.types.js +2 -1
  3. package/dist/common.types.js.map +1 -6
  4. package/dist/env.d.ts +5 -0
  5. package/dist/env.d.ts.map +1 -1
  6. package/dist/env.js +12 -8
  7. package/dist/env.js.map +1 -6
  8. package/dist/errors/argument-error.d.ts +10 -10
  9. package/dist/errors/argument-error.d.ts.map +1 -1
  10. package/dist/errors/argument-error.js +31 -14
  11. package/dist/errors/argument-error.js.map +1 -6
  12. package/dist/errors/not-implemented-error.d.ts +8 -8
  13. package/dist/errors/not-implemented-error.js +30 -12
  14. package/dist/errors/not-implemented-error.js.map +1 -6
  15. package/dist/errors/sd-error.d.ts +10 -10
  16. package/dist/errors/sd-error.d.ts.map +1 -1
  17. package/dist/errors/sd-error.js +45 -24
  18. package/dist/errors/sd-error.js.map +1 -6
  19. package/dist/errors/timeout-error.d.ts +10 -10
  20. package/dist/errors/timeout-error.js +34 -15
  21. package/dist/errors/timeout-error.js.map +1 -6
  22. package/dist/extensions/arr-ext.d.ts +2 -2
  23. package/dist/extensions/arr-ext.helpers.d.ts +10 -10
  24. package/dist/extensions/arr-ext.helpers.js +112 -89
  25. package/dist/extensions/arr-ext.helpers.js.map +1 -6
  26. package/dist/extensions/arr-ext.js +458 -422
  27. package/dist/extensions/arr-ext.js.map +1 -6
  28. package/dist/extensions/arr-ext.types.d.ts +57 -57
  29. package/dist/extensions/arr-ext.types.d.ts.map +1 -1
  30. package/dist/extensions/arr-ext.types.js +6 -1
  31. package/dist/extensions/arr-ext.types.js.map +1 -6
  32. package/dist/extensions/map-ext.d.ts +16 -16
  33. package/dist/extensions/map-ext.js +27 -22
  34. package/dist/extensions/map-ext.js.map +1 -6
  35. package/dist/extensions/set-ext.d.ts +11 -11
  36. package/dist/extensions/set-ext.js +32 -25
  37. package/dist/extensions/set-ext.js.map +1 -6
  38. package/dist/features/debounce-queue.d.ts +17 -17
  39. package/dist/features/debounce-queue.js +98 -70
  40. package/dist/features/debounce-queue.js.map +1 -6
  41. package/dist/features/event-emitter.d.ts +20 -20
  42. package/dist/features/event-emitter.js +101 -78
  43. package/dist/features/event-emitter.js.map +1 -6
  44. package/dist/features/serial-queue.d.ts +11 -11
  45. package/dist/features/serial-queue.js +78 -57
  46. package/dist/features/serial-queue.js.map +1 -6
  47. package/dist/globals.d.ts +4 -4
  48. package/dist/globals.js +9 -1
  49. package/dist/globals.js.map +1 -6
  50. package/dist/index.js +28 -27
  51. package/dist/index.js.map +1 -6
  52. package/dist/types/date-only.d.ts +64 -64
  53. package/dist/types/date-only.d.ts.map +1 -1
  54. package/dist/types/date-only.js +263 -252
  55. package/dist/types/date-only.js.map +1 -6
  56. package/dist/types/date-time.d.ts +36 -36
  57. package/dist/types/date-time.d.ts.map +1 -1
  58. package/dist/types/date-time.js +196 -288
  59. package/dist/types/date-time.js.map +1 -6
  60. package/dist/types/lazy-gc-map.d.ts +26 -26
  61. package/dist/types/lazy-gc-map.d.ts.map +1 -1
  62. package/dist/types/lazy-gc-map.js +202 -159
  63. package/dist/types/lazy-gc-map.js.map +1 -6
  64. package/dist/types/time.d.ts +23 -23
  65. package/dist/types/time.d.ts.map +1 -1
  66. package/dist/types/time.js +169 -158
  67. package/dist/types/time.js.map +1 -6
  68. package/dist/types/uuid.d.ts +11 -11
  69. package/dist/types/uuid.d.ts.map +1 -1
  70. package/dist/types/uuid.js +95 -70
  71. package/dist/types/uuid.js.map +1 -6
  72. package/dist/utils/bytes.d.ts +17 -17
  73. package/dist/utils/bytes.js +137 -81
  74. package/dist/utils/bytes.js.map +1 -6
  75. package/dist/utils/date-format.d.ts +40 -40
  76. package/dist/utils/date-format.js +187 -101
  77. package/dist/utils/date-format.js.map +1 -6
  78. package/dist/utils/error.d.ts +4 -4
  79. package/dist/utils/error.js +11 -6
  80. package/dist/utils/error.js.map +1 -6
  81. package/dist/utils/json.d.ts +19 -19
  82. package/dist/utils/json.js +187 -135
  83. package/dist/utils/json.js.map +1 -6
  84. package/dist/utils/num.d.ts +20 -20
  85. package/dist/utils/num.js +76 -34
  86. package/dist/utils/num.js.map +1 -6
  87. package/dist/utils/obj.d.ts +111 -111
  88. package/dist/utils/obj.d.ts.map +1 -1
  89. package/dist/utils/obj.js +706 -496
  90. package/dist/utils/obj.js.map +1 -6
  91. package/dist/utils/path.d.ts +10 -10
  92. package/dist/utils/path.js +35 -18
  93. package/dist/utils/path.js.map +1 -6
  94. package/dist/utils/primitive.d.ts +5 -5
  95. package/dist/utils/primitive.js +34 -14
  96. package/dist/utils/primitive.js.map +1 -6
  97. package/dist/utils/str.d.ts +38 -38
  98. package/dist/utils/str.js +217 -113
  99. package/dist/utils/str.js.map +1 -6
  100. package/dist/utils/template-strings.d.ts +26 -26
  101. package/dist/utils/template-strings.js +113 -40
  102. package/dist/utils/template-strings.js.map +1 -6
  103. package/dist/utils/transferable.d.ts +18 -18
  104. package/dist/utils/transferable.js +218 -151
  105. package/dist/utils/transferable.js.map +1 -6
  106. package/dist/utils/wait.d.ts +9 -9
  107. package/dist/utils/wait.js +30 -15
  108. package/dist/utils/wait.js.map +1 -6
  109. package/dist/utils/xml.d.ts +13 -13
  110. package/dist/utils/xml.js +84 -46
  111. package/dist/utils/xml.js.map +1 -6
  112. package/dist/utils/zip.d.ts +22 -22
  113. package/dist/utils/zip.js +172 -148
  114. package/dist/utils/zip.js.map +1 -6
  115. package/package.json +5 -7
  116. package/src/common.types.ts +14 -14
  117. package/src/env.ts +9 -1
  118. package/src/errors/argument-error.ts +15 -15
  119. package/src/errors/not-implemented-error.ts +9 -9
  120. package/src/errors/sd-error.ts +12 -12
  121. package/src/errors/timeout-error.ts +12 -12
  122. package/src/extensions/arr-ext.helpers.ts +16 -16
  123. package/src/extensions/arr-ext.ts +35 -35
  124. package/src/extensions/arr-ext.types.ts +57 -57
  125. package/src/extensions/map-ext.ts +16 -16
  126. package/src/extensions/set-ext.ts +11 -11
  127. package/src/features/debounce-queue.ts +23 -23
  128. package/src/features/event-emitter.ts +25 -25
  129. package/src/features/serial-queue.ts +13 -13
  130. package/src/globals.ts +4 -4
  131. package/src/index.ts +5 -5
  132. package/src/types/date-only.ts +84 -83
  133. package/src/types/date-time.ts +43 -42
  134. package/src/types/lazy-gc-map.ts +44 -44
  135. package/src/types/time.ts +29 -29
  136. package/src/types/uuid.ts +15 -15
  137. package/src/utils/bytes.ts +35 -35
  138. package/src/utils/date-format.ts +59 -59
  139. package/src/utils/error.ts +4 -4
  140. package/src/utils/json.ts +41 -41
  141. package/src/utils/num.ts +20 -20
  142. package/src/utils/obj.ts +138 -138
  143. package/src/utils/path.ts +10 -10
  144. package/src/utils/primitive.ts +6 -6
  145. package/src/utils/str.ts +48 -48
  146. package/src/utils/template-strings.ts +29 -29
  147. package/src/utils/transferable.ts +38 -38
  148. package/src/utils/wait.ts +10 -10
  149. package/src/utils/xml.ts +19 -19
  150. package/src/utils/zip.ts +25 -25
  151. package/README.md +0 -160
  152. package/docs/errors.md +0 -119
  153. package/docs/extensions.md +0 -387
  154. package/docs/features.md +0 -143
  155. package/docs/types.md +0 -287
  156. package/docs/utils.md +0 -757
  157. package/tests/errors/errors.spec.ts +0 -80
  158. package/tests/extensions/array-extension.spec.ts +0 -654
  159. package/tests/extensions/map-extension.spec.ts +0 -117
  160. package/tests/extensions/set-extension.spec.ts +0 -67
  161. package/tests/types/date-only.spec.ts +0 -533
  162. package/tests/types/date-time.spec.ts +0 -246
  163. package/tests/types/lazy-gc-map.spec.ts +0 -606
  164. package/tests/types/time.spec.ts +0 -428
  165. package/tests/types/uuid.spec.ts +0 -74
  166. package/tests/utils/bytes-utils.spec.ts +0 -197
  167. package/tests/utils/date-format.spec.ts +0 -350
  168. package/tests/utils/debounce-queue.spec.ts +0 -226
  169. package/tests/utils/json.spec.ts +0 -400
  170. package/tests/utils/number.spec.ts +0 -136
  171. package/tests/utils/object.spec.ts +0 -810
  172. package/tests/utils/path.spec.ts +0 -70
  173. package/tests/utils/primitive.spec.ts +0 -43
  174. package/tests/utils/sd-event-emitter.spec.ts +0 -189
  175. package/tests/utils/serial-queue.spec.ts +0 -305
  176. package/tests/utils/string.spec.ts +0 -265
  177. package/tests/utils/template-strings.spec.ts +0 -48
  178. package/tests/utils/transferable.spec.ts +0 -639
  179. package/tests/utils/wait.spec.ts +0 -123
  180. package/tests/utils/xml.spec.ts +0 -146
  181. package/tests/utils/zip.spec.ts +0 -221
@@ -3,12 +3,12 @@ import { DateOnly } from "./types/date-only";
3
3
  import { Time } from "./types/time";
4
4
  import { Uuid } from "./types/uuid";
5
5
  /**
6
- * Binary type used instead of Buffer
6
+ * Buffer 대신 사용하는 바이너리 타입
7
7
  */
8
8
  export type Bytes = Uint8Array;
9
9
  /**
10
- * Primitive type mapping
11
- * Shared with orm-common
10
+ * 원시 타입 매핑
11
+ * orm-common과 공유
12
12
  */
13
13
  export type PrimitiveTypeMap = {
14
14
  string: string;
@@ -21,19 +21,19 @@ export type PrimitiveTypeMap = {
21
21
  Bytes: Bytes;
22
22
  };
23
23
  /**
24
- * Primitive type string key
24
+ * 원시 타입 문자열 key
25
25
  */
26
26
  export type PrimitiveTypeStr = keyof PrimitiveTypeMap;
27
27
  /**
28
- * Primitive type union
28
+ * 원시 타입 union
29
29
  */
30
30
  export type PrimitiveType = PrimitiveTypeMap[PrimitiveTypeStr] | undefined;
31
31
  /**
32
- * Deep Partial type
32
+ * Deep Partial 타입
33
33
  *
34
- * Recursively makes all properties of an object optional.
35
- * Primitive types (string, number, boolean, etc.) are kept as-is,
36
- * only object/array types have Partial applied recursively.
34
+ * 객체의 모든 속성을 재귀적으로 optional로 만든다.
35
+ * 원시 타입(string, number, boolean ) 그대로 유지하고,
36
+ * object/array 타입에만 재귀적으로 Partial 적용한다.
37
37
  *
38
38
  * @example
39
39
  * ```typescript
@@ -45,7 +45,7 @@ export type PrimitiveType = PrimitiveTypeMap[PrimitiveTypeStr] | undefined;
45
45
  * };
46
46
  * }
47
47
  *
48
- * // All properties at every depth become optional
48
+ * // 모든 깊이의 속성이 optional이
49
49
  * const partial: DeepPartial<User> = {
50
50
  * profile: { address: {} }
51
51
  * };
@@ -55,10 +55,10 @@ export type DeepPartial<TObject> = Partial<{
55
55
  [K in keyof TObject]: TObject[K] extends PrimitiveType ? TObject[K] : DeepPartial<TObject[K]>;
56
56
  }>;
57
57
  /**
58
- * Constructor type
58
+ * 생성자 타입
59
59
  *
60
- * Used to represent a class constructor as a type.
61
- * Primarily used in dependency injection, factory patterns, and instanceof checks.
60
+ * 클래스 생성자를 타입으로 표현할 사용한다.
61
+ * 주로 의존성 주입, 팩토리 패턴, instanceof 체크에 활용된다.
62
62
  *
63
63
  * @example
64
64
  * function create<T>(ctor: Type<T>): T {
@@ -66,7 +66,7 @@ export type DeepPartial<TObject> = Partial<{
66
66
  * }
67
67
  *
68
68
  * class MyClass { name = "test"; }
69
- * const instance = create(MyClass); // MyClass instance
69
+ * const instance = create(MyClass); // MyClass 인스턴스
70
70
  */
71
71
  export interface Type<TInstance> extends Function {
72
72
  new (...args: unknown[]): TInstance;
@@ -2,4 +2,5 @@ import { DateTime } from "./types/date-time.js";
2
2
  import { DateOnly } from "./types/date-only.js";
3
3
  import { Time } from "./types/time.js";
4
4
  import { Uuid } from "./types/uuid.js";
5
- //# sourceMappingURL=common.types.js.map
5
+ //#endregion
6
+ //# sourceMappingURL=common.types.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/common.types.ts"],
4
- "mappings": "AAAA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,YAAY;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"common.types.js","sourceRoot":"","sources":["../src/common.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAuFpC,YAAY"}
package/dist/env.d.ts CHANGED
@@ -3,6 +3,11 @@ declare global {
3
3
  env?: Record<string, unknown>;
4
4
  }
5
5
  }
6
+ /**
7
+ * 환경변수 값을 boolean으로 파싱
8
+ * "true", "1", "yes", "on" (대소문자 무시) → true, 그 외 → false
9
+ */
10
+ export declare function parseBoolEnv(value: unknown): boolean;
6
11
  export declare const env: {
7
12
  DEV: boolean;
8
13
  VER?: string;
package/dist/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B;CACF;AAMD,eAAO,MAAM,GAAG,EAAE;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAKxB,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B;CACF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpD;AAMD,eAAO,MAAM,GAAG,EAAE;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAKxB,CAAC"}
package/dist/env.js CHANGED
@@ -1,12 +1,16 @@
1
+ /**
2
+ * 환경변수 값을 boolean으로 파싱
3
+ * "true", "1", "yes", "on" (대소문자 무시) → true, 그 외 → false
4
+ */
5
+ export function parseBoolEnv(value) {
6
+ return ["true", "1", "yes", "on"].includes(String(value ?? "").toLowerCase());
7
+ }
1
8
  const _metaEnv = import.meta.env ?? {};
2
9
  const _processEnv = typeof process !== "undefined" ? process.env : {};
3
10
  const _raw = { ..._metaEnv, ..._processEnv };
4
- const env = {
5
- ..._raw,
6
- DEV: JSON.parse(String(_raw["DEV"] != null && String(_raw["DEV"]) !== "" ? _raw["DEV"] : false)),
7
- VER: _raw["VER"]
11
+ export const env = {
12
+ ..._raw,
13
+ DEV: parseBoolEnv(_raw["DEV"]),
14
+ VER: _raw["VER"],
8
15
  };
9
- export {
10
- env
11
- };
12
- //# sourceMappingURL=env.js.map
16
+ //# sourceMappingURL=env.js.map
package/dist/env.js.map CHANGED
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/env.ts"],
4
- "mappings": "AAQA,MAAM,WAAoC,YAAY,OAAO,CAAC;AAC9D,MAAM,cAAuC,OAAO,YAAY,cAAc,QAAQ,MAAM,CAAC;AAC7F,MAAM,OAAgC,EAAE,GAAG,UAAU,GAAG,YAAY;AAE7D,MAAM,MAIT;AAAA,EACF,GAAG;AAAA,EACH,KAAK,KAAK,MAAM,OAAO,KAAK,KAAK,KAAK,QAAQ,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI,KAAK,CAAC;AAAA,EAC/F,KAAK,KAAK,KAAK;AACjB;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,QAAQ,GAA4B,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;AAChE,MAAM,WAAW,GAA4B,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/F,MAAM,IAAI,GAA4B,EAAE,GAAG,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAC;AAEtE,MAAM,CAAC,MAAM,GAAG,GAIZ;IACF,GAAG,IAAI;IACP,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAuB;CACvC,CAAC"}
@@ -1,24 +1,24 @@
1
1
  import { SdError } from "./sd-error";
2
2
  /**
3
- * Argument error
3
+ * 인자 오류
4
4
  *
5
- * An error thrown when invalid arguments are received.
6
- * Includes the argument object in YAML format in the message to facilitate debugging.
5
+ * 유효하지 않은 인자를 전달받았을 발생하는 에러.
6
+ * 디버깅을 용이하게 하기 위해 인자 객체를 YAML 형식으로 메시지에 포함한다.
7
7
  *
8
8
  * @example
9
- * // Passing only the argument object
9
+ * // 인자 객체만 전달
10
10
  * throw new ArgumentError({ userId: 123, name: null });
11
- * // Result message: "Invalid arguments.\n\nuserId: 123\nname: null"
11
+ * // 결과 메시지: "잘못된 인자입니다.\n\nuserId: 123\nname: null"
12
12
  *
13
13
  * @example
14
- * // Passing a custom message and argument object
15
- * throw new ArgumentError("Invalid user", { userId: 123 });
16
- * // Result message: "Invalid user\n\nuserId: 123"
14
+ * // 커스텀 메시지와 인자 객체를 전달
15
+ * throw new ArgumentError("잘못된 사용자", { userId: 123 });
16
+ * // 결과 메시지: "잘못된 사용자\n\nuserId: 123"
17
17
  */
18
18
  export declare class ArgumentError extends SdError {
19
- /** Output argument object in YAML format with default message ("Invalid arguments.") */
19
+ /** 기본 메시지("잘못된 인자입니다.")와 함께 인자 객체를 YAML 형식으로 출력 */
20
20
  constructor(argObj: Record<string, unknown>);
21
- /** Output argument object in YAML format with a custom message */
21
+ /** 커스텀 메시지와 함께 인자 객체를 YAML 형식으로 출력 */
22
22
  constructor(message: string, argObj: Record<string, unknown>);
23
23
  constructor(arg1: Record<string, unknown> | string, arg2?: Record<string, unknown>);
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"argument-error.d.ts","sourceRoot":"","sources":["../../src/errors/argument-error.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAc,SAAQ,OAAO;IACxC,wFAAwF;gBAC5E,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3C,kEAAkE;gBACtD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAChD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYnF"}
1
+ {"version":3,"file":"argument-error.d.ts","sourceRoot":"","sources":["../../src/errors/argument-error.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAc,SAAQ,OAAO;IACxC,mDAAmD;gBACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3C,sCAAsC;gBAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAChD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYnF"}
@@ -1,18 +1,35 @@
1
+ // yaml 라이브러리를 사용하는 이유:
2
+ // 중첩된 객체 구조를 읽기 쉬운 형식으로 표현하기 위함.
3
+ // JSON.stringify보다 트리 구조가 더 명확하게 보임.
1
4
  import YAML from "yaml";
2
5
  import { SdError } from "./sd-error.js";
3
- class ArgumentError extends SdError {
4
- constructor(arg1, arg2) {
5
- const message = typeof arg1 === "string" ? arg1 : void 0;
6
- const argObj = typeof arg1 === "string" ? arg2 : arg1;
7
- if (argObj != null) {
8
- super((message ?? "Invalid arguments.") + "\n\n" + YAML.stringify(argObj));
9
- } else {
10
- super(message ?? "Invalid arguments.");
6
+ /**
7
+ * 인자 오류
8
+ *
9
+ * 유효하지 않은 인자를 전달받았을 발생하는 에러.
10
+ * 디버깅을 용이하게 하기 위해 인자 객체를 YAML 형식으로 메시지에 포함한다.
11
+ *
12
+ * @example
13
+ * // 인자 객체만 전달
14
+ * throw new ArgumentError({ userId: 123, name: null });
15
+ * // 결과 메시지: "잘못된 인자입니다.\n\nuserId: 123\nname: null"
16
+ *
17
+ * @example
18
+ * // 커스텀 메시지와 인자 객체를 전달
19
+ * throw new ArgumentError("잘못된 사용자", { userId: 123 });
20
+ * // 결과 메시지: "잘못된 사용자\n\nuserId: 123"
21
+ */
22
+ export class ArgumentError extends SdError {
23
+ constructor(arg1, arg2) {
24
+ const message = typeof arg1 === "string" ? arg1 : undefined;
25
+ const argObj = typeof arg1 === "string" ? arg2 : arg1;
26
+ if (argObj != null) {
27
+ super((message ?? "잘못된 인자입니다.") + "\n\n" + YAML.stringify(argObj));
28
+ }
29
+ else {
30
+ super(message ?? "잘못된 인자입니다.");
31
+ }
32
+ this.name = "ArgumentError";
11
33
  }
12
- this.name = "ArgumentError";
13
- }
14
34
  }
15
- export {
16
- ArgumentError
17
- };
18
- //# sourceMappingURL=argument-error.js.map
35
+ //# sourceMappingURL=argument-error.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/errors/argument-error.ts"],
4
- "mappings": "AAGA,OAAO,UAAU;AACjB,SAAS,eAAe;AAkBjB,MAAM,sBAAsB,QAAQ;AAAA,EAMzC,YAAY,MAAwC,MAAgC;AAClF,UAAM,UAAU,OAAO,SAAS,WAAW,OAAO;AAClD,UAAM,SAAS,OAAO,SAAS,WAAW,OAAO;AAEjD,QAAI,UAAU,MAAM;AAClB,aAAO,WAAW,wBAAwB,SAAS,KAAK,UAAU,MAAM,CAAC;AAAA,IAC3E,OAAO;AACL,YAAM,WAAW,oBAAoB;AAAA,IACvC;AACA,SAAK,OAAO;AAAA,EACd;AACF;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"argument-error.js","sourceRoot":"","sources":["../../src/errors/argument-error.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,iCAAiC;AACjC,qCAAqC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAMxC,YAAY,IAAsC,EAAE,IAA8B;QAChF,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAEtD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,KAAK,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QACrE,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,OAAO,IAAI,YAAY,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
@@ -1,28 +1,28 @@
1
1
  import { SdError } from "./sd-error";
2
2
  /**
3
- * Not implemented error
3
+ * 미구현 오류
4
4
  *
5
- * An error thrown when a feature that has not yet been implemented is called.
6
- * Used for abstract method stubs, branches planned for future implementation, etc.
5
+ * 아직 구현되지 않은 기능이 호출되었을 발생하는 에러.
6
+ * 추상 메서드 스텁, 향후 구현 예정인 분기 등에 사용된다.
7
7
  *
8
8
  * @example
9
- * // Before abstract method implementation
9
+ * // 추상 메서드 구현
10
10
  * class BaseService {
11
11
  * process(): void {
12
- * throw new NotImplementedError("Implementation required in subclass");
12
+ * throw new NotImplementedError("서브클래스에서 구현 필요");
13
13
  * }
14
14
  * }
15
15
  *
16
16
  * @example
17
- * // Branch planned for future implementation
17
+ * // 향후 구현 예정인 분기
18
18
  * switch (type) {
19
19
  * case "A": return handleA();
20
- * case "B": throw new NotImplementedError(`Handling for type ${type}`);
20
+ * case "B": throw new NotImplementedError(`타입 ${type} 처리`);
21
21
  * }
22
22
  */
23
23
  export declare class NotImplementedError extends SdError {
24
24
  /**
25
- * @param message Additional description message
25
+ * @param message 추가 설명 메시지
26
26
  */
27
27
  constructor(message?: string);
28
28
  }
@@ -1,14 +1,32 @@
1
1
  import { SdError } from "./sd-error.js";
2
- class NotImplementedError extends SdError {
3
- /**
4
- * @param message Additional description message
5
- */
6
- constructor(message) {
7
- super("Not implemented" + (message != null ? ": " + message : ""));
8
- this.name = "NotImplementedError";
9
- }
2
+ /**
3
+ * 미구현 오류
4
+ *
5
+ * 아직 구현되지 않은 기능이 호출되었을 때 발생하는 에러.
6
+ * 추상 메서드 스텁, 향후 구현 예정인 분기 등에 사용된다.
7
+ *
8
+ * @example
9
+ * // 추상 메서드 구현 전
10
+ * class BaseService {
11
+ * process(): void {
12
+ * throw new NotImplementedError("서브클래스에서 구현 필요");
13
+ * }
14
+ * }
15
+ *
16
+ * @example
17
+ * // 향후 구현 예정인 분기
18
+ * switch (type) {
19
+ * case "A": return handleA();
20
+ * case "B": throw new NotImplementedError(`타입 ${type} 처리`);
21
+ * }
22
+ */
23
+ export class NotImplementedError extends SdError {
24
+ /**
25
+ * @param message 추가 설명 메시지
26
+ */
27
+ constructor(message) {
28
+ super("미구현" + (message != null ? ": " + message : ""));
29
+ this.name = "NotImplementedError";
30
+ }
10
31
  }
11
- export {
12
- NotImplementedError
13
- };
14
- //# sourceMappingURL=not-implemented-error.js.map
32
+ //# sourceMappingURL=not-implemented-error.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/errors/not-implemented-error.ts"],
4
- "mappings": "AAAA,SAAS,eAAe;AAuBjB,MAAM,4BAA4B,QAAQ;AAAA;AAAA;AAAA;AAAA,EAI/C,YAAY,SAAkB;AAC5B,UAAM,qBAAqB,WAAW,OAAO,OAAO,UAAU,GAAG;AACjE,SAAK,OAAO;AAAA,EACd;AACF;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"not-implemented-error.js","sourceRoot":"","sources":["../../src/errors/not-implemented-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,mBAAoB,SAAQ,OAAO;IAC9C;;OAEG;IACH,YAAY,OAAgB;QAC1B,KAAK,CAAC,KAAK,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
@@ -1,26 +1,26 @@
1
1
  /**
2
- * Error class supporting Tree structure composition
3
- * Utilizes ES2024 cause property
2
+ * 트리 구조 조합을 지원하는 에러 클래스
3
+ * ES2024 cause 속성을 활용
4
4
  *
5
5
  * @example
6
- * // Wrap a cause error
6
+ * // 원인 에러를 감싸기
7
7
  * try {
8
8
  * await fetch(url);
9
9
  * } catch (err) {
10
- * throw new SdError(err, "API call failed", "User load failed");
10
+ * throw new SdError(err, "API 호출 실패", "사용자 로드 실패");
11
11
  * }
12
- * // Result message: "User load failed => API call failed => original error message"
12
+ * // 결과 메시지: "사용자 로드 실패 => API 호출 실패 => 원본 에러 메시지"
13
13
  *
14
14
  * @example
15
- * // Create with message only
16
- * throw new SdError("invalid state", "processing not possible");
17
- * // Result message: "processing not possible => invalid state"
15
+ * // 메시지만으로 생성
16
+ * throw new SdError("잘못된 상태", "처리 불가");
17
+ * // 결과 메시지: "처리 불가 => 잘못된 상태"
18
18
  */
19
19
  export declare class SdError extends Error {
20
20
  cause?: Error;
21
- /** Create by wrapping a cause error. Messages are joined in reverse order (upper message => lower message => cause message) */
21
+ /** 원인 에러를 감싸서 생성. 메시지는 역순으로 결합됨 (상위 메시지 => 하위 메시지 => 원인 메시지) */
22
22
  constructor(cause: Error, ...messages: string[]);
23
- /** Create with messages only. Messages are joined in reverse order (upper message => lower message) */
23
+ /** 메시지만으로 생성. 메시지는 역순으로 결합됨 (상위 메시지 => 하위 메시지) */
24
24
  constructor(...messages: string[]);
25
25
  constructor(arg1?: unknown, ...messages: string[]);
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-error.d.ts","sourceRoot":"","sources":["../../src/errors/sd-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,OAAQ,SAAQ,KAAK;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEvB,+HAA+H;gBACnH,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE;IAC/C,uGAAuG;gBAC3F,GAAG,QAAQ,EAAE,MAAM,EAAE;gBACrB,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE;CAoClD"}
1
+ {"version":3,"file":"sd-error.d.ts","sourceRoot":"","sources":["../../src/errors/sd-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,OAAQ,SAAQ,KAAK;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEvB,gEAAgE;gBACpD,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE;IAC/C,kDAAkD;gBACtC,GAAG,QAAQ,EAAE,MAAM,EAAE;gBACrB,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE;CAoClD"}
@@ -1,26 +1,47 @@
1
- class SdError extends Error {
2
- cause;
3
- constructor(arg1, ...messages) {
4
- const arg1Message = arg1 instanceof Error ? arg1.message : typeof arg1 === "string" ? arg1 : arg1 != null ? String(arg1) : void 0;
5
- const fullMessage = [arg1Message, ...messages].filter((m) => m != null).reverse().join(" => ");
6
- const cause = arg1 instanceof Error ? arg1 : void 0;
7
- super(fullMessage, { cause });
8
- Object.setPrototypeOf(this, new.target.prototype);
9
- this.name = "SdError";
10
- if ("captureStackTrace" in Error) {
11
- Error.captureStackTrace(
12
- this,
13
- new.target
14
- );
1
+ /**
2
+ * 트리 구조 조합을 지원하는 에러 클래스
3
+ * ES2024 cause 속성을 활용
4
+ *
5
+ * @example
6
+ * // 원인 에러를 감싸기
7
+ * try {
8
+ * await fetch(url);
9
+ * } catch (err) {
10
+ * throw new SdError(err, "API 호출 실패", "사용자 로드 실패");
11
+ * }
12
+ * // 결과 메시지: "사용자 로드 실패 => API 호출 실패 => 원본 에러 메시지"
13
+ *
14
+ * @example
15
+ * // 메시지만으로 생성
16
+ * throw new SdError("잘못된 상태", "처리 불가");
17
+ * // 결과 메시지: "처리 불가 => 잘못된 상태"
18
+ */
19
+ export class SdError extends Error {
20
+ cause;
21
+ constructor(arg1, ...messages) {
22
+ const arg1Message = arg1 instanceof Error
23
+ ? arg1.message
24
+ : typeof arg1 === "string"
25
+ ? arg1
26
+ : arg1 != null
27
+ ? String(arg1)
28
+ : undefined;
29
+ const fullMessage = [arg1Message, ...messages]
30
+ .filter((m) => m != null)
31
+ .reverse()
32
+ .join(" => ");
33
+ const cause = arg1 instanceof Error ? arg1 : undefined;
34
+ super(fullMessage, { cause });
35
+ Object.setPrototypeOf(this, new.target.prototype);
36
+ this.name = "SdError";
37
+ // captureStackTrace는 V8 엔진(Node.js, Chrome)에서만 사용 가능
38
+ if ("captureStackTrace" in Error) {
39
+ Error.captureStackTrace(this, new.target);
40
+ }
41
+ // 원인 체인 stack을 현재 stack에 추가
42
+ if (cause?.stack != null) {
43
+ this.stack += `\n---- cause stack ----\n${cause.stack}`;
44
+ }
15
45
  }
16
- if ((cause == null ? void 0 : cause.stack) != null) {
17
- this.stack += `
18
- ---- cause stack ----
19
- ${cause.stack}`;
20
- }
21
- }
22
46
  }
23
- export {
24
- SdError
25
- };
26
- //# sourceMappingURL=sd-error.js.map
47
+ //# sourceMappingURL=sd-error.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/errors/sd-error.ts"],
4
- "mappings": "AAkBO,MAAM,gBAAgB,MAAM;AAAA,EACxB;AAAA,EAOT,YAAY,SAAmB,UAAoB;AACjD,UAAM,cACJ,gBAAgB,QACZ,KAAK,UACL,OAAO,SAAS,WACd,OACA,QAAQ,OACN,OAAO,IAAI,IACX;AAEV,UAAM,cAAc,CAAC,aAAa,GAAG,QAAQ,EAC1C,OAAO,CAAC,MAAM,KAAK,IAAI,EACvB,QAAQ,EACR,KAAK,MAAM;AAEd,UAAM,QAAQ,gBAAgB,QAAQ,OAAO;AAE7C,UAAM,aAAa,EAAE,MAAM,CAAC;AAE5B,WAAO,eAAe,MAAM,WAAW,SAAS;AAChD,SAAK,OAAO;AAGZ,QAAI,uBAAuB,OAAO;AAChC,MAAC,MAAM;AAAA,QACL;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAGA,SAAI,+BAAO,UAAS,MAAM;AACxB,WAAK,SAAS;AAAA;AAAA,EAA4B,MAAM,KAAK;AAAA,IACvD;AAAA,EACF;AACF;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"sd-error.js","sourceRoot":"","sources":["../../src/errors/sd-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK;IACvB,KAAK,CAAS;IAOvB,YAAY,IAAc,EAAE,GAAG,QAAkB;QAC/C,MAAM,WAAW,GACf,IAAI,YAAY,KAAK;YACnB,CAAC,CAAC,IAAI,CAAC,OAAO;YACd,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,IAAI,IAAI,IAAI;oBACZ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;oBACd,CAAC,CAAC,SAAS,CAAC;QAEpB,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC;aAC3C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC;aACxB,OAAO,EAAE;aACT,IAAI,CAAC,MAAM,CAAC,CAAC;QAEhB,MAAM,KAAK,GAAG,IAAI,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAEvD,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QAEtB,qDAAqD;QACrD,IAAI,mBAAmB,IAAI,KAAK,EAAE,CAAC;YAChC,KAAK,CAAC,iBAA+E,CACpF,IAAI,EACJ,GAAG,CAAC,MAAM,CACX,CAAC;QACJ,CAAC;QAED,4BAA4B;QAC5B,IAAI,KAAK,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,IAAI,4BAA4B,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1D,CAAC;IACH,CAAC;CACF"}
@@ -1,30 +1,30 @@
1
1
  import { SdError } from "./sd-error";
2
2
  /**
3
- * Timeout error
3
+ * 타임아웃 오류
4
4
  *
5
- * An error that occurs when the waiting time is exceeded.
6
- * Automatically thrown when the maximum number of attempts is exceeded in async waiting functions like Wait.until().
5
+ * 대기 시간이 초과되었을 발생하는 에러.
6
+ * Wait.until() 같은 비동기 대기 함수에서 최대 시도 횟수를 초과하면 자동으로 발생한다.
7
7
  *
8
8
  * @example
9
- * // Automatically thrown from Wait.until
9
+ * // Wait.until에서 자동 발생
10
10
  * try {
11
- * await Wait.until(() => isReady, 100, 50); // 100ms interval, max 50 attempts
11
+ * await Wait.until(() => isReady, 100, 50); // 100ms 간격, 최대 50 시도
12
12
  * } catch (err) {
13
13
  * if (err instanceof TimeoutError) {
14
- * console.log("Timeout exceeded");
14
+ * console.log("타임아웃 초과");
15
15
  * }
16
16
  * }
17
17
  *
18
18
  * @example
19
- * // Thrown directly
19
+ * // 직접 발생
20
20
  * if (elapsed > maxTime) {
21
- * throw new TimeoutError(undefined, "Waiting for API response exceeded");
21
+ * throw new TimeoutError(undefined, "API 응답 대기 초과");
22
22
  * }
23
23
  */
24
24
  export declare class TimeoutError extends SdError {
25
25
  /**
26
- * @param count Number of attempts
27
- * @param message Additional message
26
+ * @param count 시도 횟수
27
+ * @param message 추가 메시지
28
28
  */
29
29
  constructor(count?: number, message?: string);
30
30
  }
@@ -1,17 +1,36 @@
1
1
  import { SdError } from "./sd-error.js";
2
- class TimeoutError extends SdError {
3
- /**
4
- * @param count Number of attempts
5
- * @param message Additional message
6
- */
7
- constructor(count, message) {
8
- super(
9
- "Waiting time exceeded" + (count != null ? `(${count} attempts)` : "") + (message != null ? `: ${message}` : "")
10
- );
11
- this.name = "TimeoutError";
12
- }
2
+ /**
3
+ * 타임아웃 오류
4
+ *
5
+ * 대기 시간이 초과되었을 때 발생하는 에러.
6
+ * Wait.until() 같은 비동기 대기 함수에서 최대 시도 횟수를 초과하면 자동으로 발생한다.
7
+ *
8
+ * @example
9
+ * // Wait.until에서 자동 발생
10
+ * try {
11
+ * await Wait.until(() => isReady, 100, 50); // 100ms 간격, 최대 50회 시도
12
+ * } catch (err) {
13
+ * if (err instanceof TimeoutError) {
14
+ * console.log("타임아웃 초과");
15
+ * }
16
+ * }
17
+ *
18
+ * @example
19
+ * // 직접 발생
20
+ * if (elapsed > maxTime) {
21
+ * throw new TimeoutError(undefined, "API 응답 대기 초과");
22
+ * }
23
+ */
24
+ export class TimeoutError extends SdError {
25
+ /**
26
+ * @param count 시도 횟수
27
+ * @param message 추가 메시지
28
+ */
29
+ constructor(count, message) {
30
+ super("대기 시간 초과" +
31
+ (count != null ? `(${count}회 시도)` : "") +
32
+ (message != null ? `: ${message}` : ""));
33
+ this.name = "TimeoutError";
34
+ }
13
35
  }
14
- export {
15
- TimeoutError
16
- };
17
- //# sourceMappingURL=timeout-error.js.map
36
+ //# sourceMappingURL=timeout-error.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/errors/timeout-error.ts"],
4
- "mappings": "AAAA,SAAS,eAAe;AAwBjB,MAAM,qBAAqB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKxC,YAAY,OAAgB,SAAkB;AAC5C;AAAA,MACE,2BACG,SAAS,OAAO,IAAI,KAAK,eAAe,OACxC,WAAW,OAAO,KAAK,OAAO,KAAK;AAAA,IACxC;AACA,SAAK,OAAO;AAAA,EACd;AACF;",
5
- "names": []
6
- }
1
+ {"version":3,"file":"timeout-error.js","sourceRoot":"","sources":["../../src/errors/timeout-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IACvC;;;OAGG;IACH,YAAY,KAAc,EAAE,OAAgB;QAC1C,KAAK,CACH,UAAU;YACR,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC1C,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Array extension methods
2
+ * Array 확장 메서드
3
3
  *
4
- * @remarks See type definition file (arr-ext.types.ts) for TSDoc of each method
4
+ * @remarks 메서드의 TSDoc은 타입 정의 파일(arr-ext.types.ts) 참조
5
5
  */
6
6
  import "./map-ext";
7
7
  import type { ReadonlyArrayExt, MutableArrayExt } from "./arr-ext.types";
@@ -1,24 +1,24 @@
1
1
  /**
2
- * Array extension helper functions
2
+ * Array 확장 헬퍼 함수
3
3
  */
4
4
  import type { ComparableType } from "./arr-ext.types";
5
5
  /**
6
- * Convert DateTime, DateOnly, Time to comparable primitive values
6
+ * DateTime, DateOnly, Time 비교 가능한 원시 값으로 변환
7
7
  */
8
8
  export declare function toComparable(value: ComparableType): string | number | boolean | undefined;
9
9
  /**
10
- * Comparison function for sorting
10
+ * 정렬용 비교 함수
11
11
  *
12
- * @param pp comparison target 1
13
- * @param pn comparison target 2
14
- * @param desc true: descending, false: ascending
15
- * @returns negative: pp comes first, 0: equal, positive: pn comes first
16
- * @note null/undefined values are sorted first in ascending, last in descending
12
+ * @param pp 비교 대상 1
13
+ * @param pn 비교 대상 2
14
+ * @param desc true: 내림차순, false: 오름차순
15
+ * @returns 음수: pp 앞, 0: 같음, 양수: pn
16
+ * @note null/undefined 값은 오름차순에서 앞, 내림차순에서 뒤로 정렬됨
17
17
  */
18
18
  export declare function compareForOrder(pp: ComparableType, pn: ComparableType, desc: boolean): number;
19
19
  /**
20
- * Returns a Set of indices to KEEP (i.e., first occurrence of each unique item).
21
- * Handles all deduplication strategies: matchAddress, keyFn, and default type-based.
20
+ * 유지할 index의 Set 반환 (즉, 고유 항목의 번째 등장 위치).
21
+ * matchAddress, keyFn, 기본 타입 기반 등 모든 중복 제거 전략을 처리한다.
22
22
  */
23
23
  export declare function getDistinctIndices<TItem>(items: readonly TItem[], options?: boolean | {
24
24
  matchAddress?: boolean;