@rzl-zone/utils-js 3.1.0-beta.2 → 3.1.2-beta.0

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 (136) hide show
  1. package/README.md +2 -2
  2. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +23 -23
  3. package/dist/any-BmdI8UbK.d.ts +56 -56
  4. package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +66 -66
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +396 -396
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-26W3VZIK.cjs +1 -0
  9. package/dist/chunk-2KRCHXFG.cjs +2 -0
  10. package/dist/{chunk-TQMZ2LPI.js → chunk-33ZLH266.js} +1 -1
  11. package/dist/{chunk-VQLAPEL3.js → chunk-4L4EJTNZ.js} +1 -1
  12. package/dist/{chunk-CK3BZGEU.js → chunk-5Q37AP7P.js} +1 -1
  13. package/dist/chunk-7CHFAMS2.js +1 -0
  14. package/dist/{chunk-REFMEB4A.js → chunk-7MMJZ6HS.js} +1 -1
  15. package/dist/chunk-7TC6DE3J.cjs +1 -0
  16. package/dist/{chunk-K4PLGD7C.js → chunk-7VX33E3V.js} +1 -1
  17. package/dist/chunk-BEZPD44N.cjs +1 -0
  18. package/dist/{chunk-2AUUPGMN.js → chunk-BI263OHW.js} +1 -1
  19. package/dist/{chunk-LVUSFXQS.cjs → chunk-CII6WWLO.cjs} +1 -1
  20. package/dist/{chunk-OX6RLS2F.cjs → chunk-D5TYPCWU.cjs} +1 -1
  21. package/dist/{chunk-MWLEM7ED.js → chunk-EEQY5QUG.js} +1 -1
  22. package/dist/chunk-ESJYBIYH.js +1 -0
  23. package/dist/{chunk-MJAW5RAK.js → chunk-EWYPSKKM.js} +1 -1
  24. package/dist/chunk-EXCOQLWX.cjs +1 -0
  25. package/dist/chunk-FWQVTMYA.cjs +1 -0
  26. package/dist/{chunk-25G6B35W.js → chunk-G4EWCRKS.js} +1 -1
  27. package/dist/{chunk-PFLNHD4B.cjs → chunk-G7R5XZRM.cjs} +1 -1
  28. package/dist/{chunk-EXXLUO7L.cjs → chunk-GGEV7LXX.cjs} +1 -1
  29. package/dist/{chunk-VTR75UID.cjs → chunk-HJOZOENU.cjs} +1 -1
  30. package/dist/{chunk-HXTACM3O.cjs → chunk-IRDZVLNZ.cjs} +1 -1
  31. package/dist/chunk-IW73G523.cjs +1 -0
  32. package/dist/chunk-IY5OZAB3.cjs +1 -0
  33. package/dist/{chunk-467VEMJH.js → chunk-J4NCYYGS.js} +1 -1
  34. package/dist/{chunk-RHIBYOFQ.js → chunk-J7JAZAJD.js} +1 -1
  35. package/dist/{chunk-JQZUWBIX.js → chunk-JYNSO7ZY.js} +1 -1
  36. package/dist/{chunk-UUMKL74S.js → chunk-K3UVKYEU.js} +1 -1
  37. package/dist/{chunk-ME5OV5HN.js → chunk-LQ76EDZG.js} +1 -1
  38. package/dist/chunk-MROH35V3.cjs +1 -0
  39. package/dist/chunk-NJSAV73S.js +1 -0
  40. package/dist/{chunk-HXST7RJB.js → chunk-NR44SNYE.js} +1 -1
  41. package/dist/{chunk-BLCANGFS.js → chunk-NXMTWY77.js} +1 -1
  42. package/dist/chunk-OZCQZO2V.cjs +4 -0
  43. package/dist/chunk-Q3NTKN5I.cjs +1 -0
  44. package/dist/{chunk-NSVLG7NY.js → chunk-QDNSC57Z.js} +1 -1
  45. package/dist/{chunk-NUVGETPD.js → chunk-QGXTL5ZH.js} +1 -1
  46. package/dist/{chunk-D43GV6EF.cjs → chunk-QSQDP7L2.cjs} +1 -1
  47. package/dist/{chunk-U4TZO7WV.js → chunk-S5M33A4O.js} +1 -1
  48. package/dist/{chunk-S7GMG4TB.js → chunk-SGTHOQQ2.js} +1 -1
  49. package/dist/chunk-SL3RQOWA.js +1 -0
  50. package/dist/{chunk-NUHOOAUN.cjs → chunk-SZPWZZYG.cjs} +1 -1
  51. package/dist/{chunk-RHE3M2NJ.cjs → chunk-UA4B7JBO.cjs} +1 -1
  52. package/dist/chunk-UQDJF5RR.cjs +1 -0
  53. package/dist/chunk-UTQUYABU.cjs +1 -0
  54. package/dist/{chunk-G72VSVGO.js → chunk-VPW3DRV5.js} +1 -1
  55. package/dist/{chunk-PSWITZK5.js → chunk-W32WALNU.js} +1 -1
  56. package/dist/chunk-XGZ6K753.cjs +1 -0
  57. package/dist/chunk-YFTR64N5.cjs +1 -0
  58. package/dist/chunk-ZFDS7W6B.cjs +1 -0
  59. package/dist/chunk-ZQOLZE6Z.cjs +1 -0
  60. package/dist/conversions/index.cjs +1 -1
  61. package/dist/conversions/index.d.ts +1285 -1285
  62. package/dist/conversions/index.js +1 -1
  63. package/dist/env/index.d.ts +14 -14
  64. package/dist/events/index.cjs +1 -1
  65. package/dist/events/index.d.ts +109 -109
  66. package/dist/events/index.js +1 -1
  67. package/dist/extends-Bk_SBGdT.d.ts +330 -330
  68. package/dist/formatting/index.cjs +1 -1
  69. package/dist/formatting/index.d.ts +855 -855
  70. package/dist/formatting/index.js +1 -1
  71. package/dist/generator/index.cjs +1 -1
  72. package/dist/generator/index.d.ts +155 -155
  73. package/dist/generator/index.js +1 -1
  74. package/dist/if-CvT4R7Kh.d.ts +16 -16
  75. package/dist/is-array--YjXV-Wx.d.ts +1084 -1084
  76. package/dist/isPlainObject-BVhBAPHX.d.ts +154 -154
  77. package/dist/never-BfayMBF9.d.ts +64 -64
  78. package/dist/next/index.cjs +5 -5
  79. package/dist/next/index.d.ts +183 -183
  80. package/dist/next/index.js +1 -1
  81. package/dist/next/server/index.cjs +1 -1
  82. package/dist/next/server/index.d.ts +25 -25
  83. package/dist/next/server/index.js +1 -1
  84. package/dist/nils-DMz3kU7M.d.ts +155 -155
  85. package/dist/omit-VvmIsZmX.d.ts +25 -25
  86. package/dist/operations/index.cjs +1 -1
  87. package/dist/operations/index.d.ts +120 -120
  88. package/dist/operations/index.js +1 -1
  89. package/dist/parsers/index.cjs +1 -1
  90. package/dist/parsers/index.d.ts +34 -34
  91. package/dist/parsers/index.js +1 -1
  92. package/dist/predicates/index.cjs +1 -1
  93. package/dist/predicates/index.d.ts +1674 -1674
  94. package/dist/predicates/index.js +1 -1
  95. package/dist/prettify-C4xLcYOP.d.ts +328 -328
  96. package/dist/promise/index.cjs +1 -1
  97. package/dist/promise/index.d.ts +29 -29
  98. package/dist/promise/index.js +1 -1
  99. package/dist/rzl-utils.global.js +1 -1
  100. package/dist/string-XA-til3C.d.ts +318 -318
  101. package/dist/strings/index.cjs +1 -1
  102. package/dist/strings/index.d.ts +690 -690
  103. package/dist/strings/index.js +1 -1
  104. package/dist/stylings/index.cjs +1 -1
  105. package/dist/stylings/index.d.ts +35 -35
  106. package/dist/stylings/index.js +1 -1
  107. package/dist/type-data-DDs-u2kq.d.ts +241 -241
  108. package/dist/types/index.d.ts +3264 -3264
  109. package/dist/urls/index.cjs +1 -1
  110. package/dist/urls/index.d.ts +373 -373
  111. package/dist/urls/index.js +1 -1
  112. package/package.json +3 -15
  113. package/dist/chunk-2JQQQ625.js +0 -1
  114. package/dist/chunk-445TAVT4.cjs +0 -1
  115. package/dist/chunk-6Q4I2RPC.cjs +0 -1
  116. package/dist/chunk-6SMJMZ7G.cjs +0 -1
  117. package/dist/chunk-DFSTVQFI.cjs +0 -1
  118. package/dist/chunk-DYRDBYPF.cjs +0 -1
  119. package/dist/chunk-GAJTFCUA.js +0 -1
  120. package/dist/chunk-GOJNH55O.cjs +0 -1
  121. package/dist/chunk-IJTZWWRJ.cjs +0 -1
  122. package/dist/chunk-ISJ33O2J.cjs +0 -1
  123. package/dist/chunk-JISH2VGG.js +0 -1
  124. package/dist/chunk-KZQB7H4E.cjs +0 -1
  125. package/dist/chunk-LUVV5KSD.cjs +0 -2
  126. package/dist/chunk-MF5Y5K4N.cjs +0 -1
  127. package/dist/chunk-O5VXBNUQ.cjs +0 -4
  128. package/dist/chunk-O7SJR4CY.cjs +0 -1
  129. package/dist/chunk-PYUVKHUF.cjs +0 -1
  130. package/dist/chunk-XFCJDSB2.cjs +0 -1
  131. package/dist/chunk-XOYX4PLZ.cjs +0 -1
  132. package/dist/chunk-Z6FLCEN6.js +0 -1
  133. package/dist/chunk-ZO5364A6.cjs +0 -1
  134. package/dist/index.cjs +0 -1
  135. package/dist/index.d.ts +0 -1
  136. package/dist/index.js +0 -1
@@ -1,408 +1,408 @@
1
1
  import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-BVhBAPHX.js';import'../type-data-DDs-u2kq.js';
2
2
  /** -------------------------------------------------------
3
- * * ***Shape of the object passed to custom error message functions.***
4
- * -------------------------------------------------------
5
- * This type describes the parameters received when `options.message`
6
- * is defined as a function in `AssertIsOptions`.
7
- *
8
- * - `currentType` ➔ the actual detected runtime type of the value.
9
- * - `validType` ➔ the required/expected type name that the value must match.
10
- *
11
- * @example
12
- * ```ts
13
- * const options: AssertIsOptions = {
14
- * message: ({ currentType, validType }) =>
15
- * `Expected ${validType} but got ${currentType}`
16
- * };
17
- * ```
18
- */
19
- type AssertIsOptionsMessageFunction={
3
+ * * ***Shape of the object passed to custom error message functions.***
4
+ * -------------------------------------------------------
5
+ * This type describes the parameters received when `options.message`
6
+ * is defined as a function in `OptionsAssertIs`.
7
+ *
8
+ * - `currentType` ➔ the actual detected runtime type of the value.
9
+ * - `validType` ➔ the required/expected type name that the value must match.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const options: OptionsAssertIs = {
14
+ * message: ({ currentType, validType }) =>
15
+ * `Expected ${validType} but got ${currentType}`
16
+ * };
17
+ * ```
18
+ */
19
+ type OptionsMessageFunctionAssertIs={
20
20
  /** The actual runtime type of the value being checked.
21
- *
22
- * - Example: `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
23
- */
21
+ *
22
+ * - Example: `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
23
+ */
24
24
  currentType:string;
25
25
  /** The required/expected type that the value must conform to.
26
- *
27
- * - Example: `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
28
- */
29
- validType:string;};type AssertIsOptions={
26
+ *
27
+ * - Example: `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
28
+ */
29
+ validType:string;};type OptionsAssertIs={
30
30
  /** -------------------------------------------------------
31
- * * ***Custom error message for assertion failures.***
32
- * -------------------------------------------------------
33
- *
34
- * @description
35
- * This option allows overriding the **default error message** when a value
36
- * does not match the required type.
37
- *
38
- * - If a **string** is provided:
39
- * - Must be non-empty after trimming.
40
- * - Will be used directly as the error message.
41
- *
42
- * - If a **function** is provided:
43
- * - Receives an object containing:
44
- * - `currentType` ➔ the detected runtime type of the value (depends `formatCase` options, e.g., `"number"`).
45
- * - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
46
- * - Must return a string. If the returned string is empty or whitespace,
47
- * the default message will be used instead.
48
- *
49
- * @example
50
- * ```ts
51
- * // Static message
52
- * { message: "Must be a boolean!" }
53
- *
54
- * // Dynamic message
55
- * {
56
- * message: ({ currentType, validType }) =>
57
- * `Expected ${validType} but got ${currentType}`
58
- * }
59
- * ```
60
- */
61
- message?:string|(({currentType,validType}:AssertIsOptionsMessageFunction)=>string);}& GetPreciseTypeOptions;
31
+ * * ***Custom error message for assertion failures.***
32
+ * -------------------------------------------------------
33
+ *
34
+ * @description
35
+ * This option allows overriding the **default error message** when a value
36
+ * does not match the required type.
37
+ *
38
+ * - If a **string** is provided:
39
+ * - Must be non-empty after trimming.
40
+ * - Will be used directly as the error message.
41
+ *
42
+ * - If a **function** is provided:
43
+ * - Receives an object containing:
44
+ * - `currentType` ➔ the detected runtime type of the value (depends `formatCase` options, e.g., `"number"`).
45
+ * - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
46
+ * - Must return a string. If the returned string is empty or whitespace,
47
+ * the default message will be used instead.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * // Static message
52
+ * { message: "Must be a boolean!" }
53
+ *
54
+ * // Dynamic message
55
+ * {
56
+ * message: ({ currentType, validType }) =>
57
+ * `Expected ${validType} but got ${currentType}`
58
+ * }
59
+ * ```
60
+ */
61
+ message?:string|(({currentType,validType}:OptionsMessageFunctionAssertIs)=>string);}& GetPreciseTypeOptions;
62
62
  /** -------------------------------------------------------
63
- * * ***Type guard assertion: `assertIsBoolean`.***
64
- * -------------------------------------------------------
65
- * **This function is an **assertion function**.**
66
- * - Validates that the given `value` is a **boolean**.
67
- * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
68
- * - **Behavior:**
69
- * - ✅ If `value` is a `boolean` ➔ execution continues normally.
70
- * - ❌ If `value` is not a `boolean` ➔ throws a `TypeError` with either:
71
- * - A custom error message (`options.message`), or
72
- * - A default message including the actual type.
73
- * @param {*} value - The value to validate.
74
- * @param {AssertIsOptions|undefined} options - Optional configuration:
75
- * - `message`: A custom error message (`string` or `function`).
76
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
77
- * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
78
- * @throws {TypeError} If the value is not a boolean.
79
- * @example
80
- * ```ts
81
- * // ✅ Simple usage
82
- * assertIsBoolean(true);
83
- * // No error, value is boolean
84
- *
85
- * // ❌ Throws TypeError with default message
86
- * assertIsBoolean(42);
87
- * // ➔ TypeError: "Parameter input (`value`) must be of type `boolean`, but received: `number`."
88
- *
89
- * // ❌ Throws with custom string message
90
- * assertIsBoolean(42, { message: "Must be boolean!" });
91
- * // ➔ TypeError: "Must be boolean!"
92
- *
93
- * // ❌ Throws with custom function message + case formatting
94
- * assertIsBoolean(123n, {
95
- * message: ({ currentType, validType }) =>
96
- * `Expected ${validType} but got (${currentType}).`,
97
- * formatCase: "toKebabCase"
98
- * });
99
- * // ➔ TypeError: "Expected boolean but got (big-int)."
100
- * ```
101
- * -------------------------------------------------------
102
- * ✅ ***Real-world usage example***:
103
- * ```ts
104
- * type User = { name: string; email: string };
105
- * const mixedValue: string | User | boolean | number | undefined = getUserInput();
106
- *
107
- * // ❌ Throws if not boolean
108
- * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
109
- * assertIsBoolean(mixedValue, { message: "Must be boolean!" });
110
- *
111
- * // ✅ After this call, TypeScript knows `mixedValue` is boolean
112
- * const result: boolean = mixedValue; // ➔ Safe to use
113
- * ```
114
- */
115
- declare const assertIsBoolean:(value:unknown,options?:AssertIsOptions)=>asserts value is boolean;
63
+ * * ***Type guard assertion: `assertIsBoolean`.***
64
+ * -------------------------------------------------------
65
+ * **This function is an **assertion function**.**
66
+ * - Validates that the given `value` is a **boolean**.
67
+ * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
68
+ * - **Behavior:**
69
+ * - ✅ If `value` is a `boolean` ➔ execution continues normally.
70
+ * - ❌ If `value` is not a `boolean` ➔ throws a `TypeError` with either:
71
+ * - A custom error message (`options.message`), or
72
+ * - A default message including the actual type.
73
+ * @param {*} value - The value to validate.
74
+ * @param {OptionsAssertIs} [options] - Optional configuration:
75
+ * - `message`: A custom error message (`string` or `function`).
76
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
77
+ * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
78
+ * @throws {TypeError} If the value is not a boolean.
79
+ * @example
80
+ * ```ts
81
+ * // ✅ Simple usage
82
+ * assertIsBoolean(true);
83
+ * // No error, value is boolean
84
+ *
85
+ * // ❌ Throws TypeError with default message
86
+ * assertIsBoolean(42);
87
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `boolean`, but received: `number`."
88
+ *
89
+ * // ❌ Throws with custom string message
90
+ * assertIsBoolean(42, { message: "Must be boolean!" });
91
+ * // ➔ TypeError: "Must be boolean!"
92
+ *
93
+ * // ❌ Throws with custom function message + case formatting
94
+ * assertIsBoolean(123n, {
95
+ * message: ({ currentType, validType }) =>
96
+ * `Expected ${validType} but got (${currentType}).`,
97
+ * formatCase: "toKebabCase"
98
+ * });
99
+ * // ➔ TypeError: "Expected boolean but got (big-int)."
100
+ * ```
101
+ * -------------------------------------------------------
102
+ * ✅ ***Real-world usage example***:
103
+ * ```ts
104
+ * type User = { name: string; email: string };
105
+ * const mixedValue: string | User | boolean | number | undefined = getUserInput();
106
+ *
107
+ * // ❌ Throws if not boolean
108
+ * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
109
+ * assertIsBoolean(mixedValue, { message: "Must be boolean!" });
110
+ *
111
+ * // ✅ After this call, TypeScript knows `mixedValue` is boolean
112
+ * const result: boolean = mixedValue; // ➔ Safe to use
113
+ * ```
114
+ */
115
+ declare const assertIsBoolean:(value:unknown,options?:OptionsAssertIs)=>asserts value is boolean;
116
116
  /** -------------------------------------------------------
117
- * * ***Type guard assertion: `assertIsBigInt`.***
118
- * -------------------------------------------------------
119
- * **This function is an **assertion function**.**
120
- * - Validates that the given `value` is a **bigint**.
121
- * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
122
- * - **Behavior:**
123
- * - ✅ If `value` is a `bigint` ➔ execution continues normally.
124
- * - ❌ If `value` is not a `bigint` ➔ throws a `TypeError` with either:
125
- * - A custom error message (`options.message`), or
126
- * - A default message including the actual type.
127
- * - **ℹ️ Note:**
128
- * - A `bigint` refers strictly to the JavaScript `bigint` primitive type (e.g., `123n`, `0n`, `-999999999999999999999n`).
129
- * - This excludes `BigInt` objects created with `Object(BigInt(123))`.
130
- * @param {*} value - The value to validate.
131
- * @param {AssertIsOptions|undefined} options - Optional configuration:
132
- * - `message`: A custom error message (`string` or `function`).
133
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
134
- * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
135
- * @throws {TypeError} If the value is not a bigint.
136
- * @example
137
- * ```ts
138
- * // ✅ Simple usage
139
- * assertIsBigInt(123n);
140
- * // No error, value is bigint
141
- *
142
- * // ❌ Throws TypeError with default message
143
- * assertIsBigInt(42);
144
- * // ➔ TypeError: "Parameter input (`value`) must be of type `bigint`, but received: `number`."
145
- *
146
- * // ❌ Throws with custom string message
147
- * assertIsBigInt("123", { message: "Must be a bigint!" });
148
- * // ➔ TypeError: "Must be a bigint!"
149
- *
150
- * // ❌ Throws with custom function message + case formatting
151
- * assertIsBigInt(42, {
152
- * message: ({ currentType, validType }) =>
153
- * `Expected ${validType} but got (${currentType}).`,
154
- * formatCase: "toKebabCase"
155
- * });
156
- * // ➔ TypeError: "Expected bigint but got (number)."
157
- * ```
158
- * -------------------------------------------------------
159
- * ✅ ***Real-world usage example***:
160
- * ```ts
161
- * const mixedValue: string | bigint | undefined = getUserInput();
162
- *
163
- * // ❌ Throws if not bigint
164
- * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
165
- * assertIsBigInt(mixedValue, { message: "Must be a bigint!" });
166
- *
167
- * // ✅ After this call, TypeScript knows `mixedValue` is bigint
168
- * const result: bigint = mixedValue; // ➔ Safe to use
169
- * console.log(result + 100n);
170
- * ```
171
- */
172
- declare const assertIsBigInt:(value:unknown,options?:AssertIsOptions)=>asserts value is bigint;type AssertIsNumberOptions=AssertIsOptions & IsNumberOptions;
117
+ * * ***Type guard assertion: `assertIsBigInt`.***
118
+ * -------------------------------------------------------
119
+ * **This function is an **assertion function**.**
120
+ * - Validates that the given `value` is a **bigint**.
121
+ * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
122
+ * - **Behavior:**
123
+ * - ✅ If `value` is a `bigint` ➔ execution continues normally.
124
+ * - ❌ If `value` is not a `bigint` ➔ throws a `TypeError` with either:
125
+ * - A custom error message (`options.message`), or
126
+ * - A default message including the actual type.
127
+ * - **ℹ️ Note:**
128
+ * - A `bigint` refers strictly to the JavaScript `bigint` primitive type (e.g., `123n`, `0n`, `-999999999999999999999n`).
129
+ * - This excludes `BigInt` objects created with `Object(BigInt(123))`.
130
+ * @param {*} value - The value to validate.
131
+ * @param {OptionsAssertIs} [options] - Optional configuration:
132
+ * - `message`: A custom error message (`string` or `function`).
133
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
134
+ * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
135
+ * @throws {TypeError} If the value is not a bigint.
136
+ * @example
137
+ * ```ts
138
+ * // ✅ Simple usage
139
+ * assertIsBigInt(123n);
140
+ * // No error, value is bigint
141
+ *
142
+ * // ❌ Throws TypeError with default message
143
+ * assertIsBigInt(42);
144
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `bigint`, but received: `number`."
145
+ *
146
+ * // ❌ Throws with custom string message
147
+ * assertIsBigInt("123", { message: "Must be a bigint!" });
148
+ * // ➔ TypeError: "Must be a bigint!"
149
+ *
150
+ * // ❌ Throws with custom function message + case formatting
151
+ * assertIsBigInt(42, {
152
+ * message: ({ currentType, validType }) =>
153
+ * `Expected ${validType} but got (${currentType}).`,
154
+ * formatCase: "toKebabCase"
155
+ * });
156
+ * // ➔ TypeError: "Expected bigint but got (number)."
157
+ * ```
158
+ * -------------------------------------------------------
159
+ * ✅ ***Real-world usage example***:
160
+ * ```ts
161
+ * const mixedValue: string | bigint | undefined = getUserInput();
162
+ *
163
+ * // ❌ Throws if not bigint
164
+ * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
165
+ * assertIsBigInt(mixedValue, { message: "Must be a bigint!" });
166
+ *
167
+ * // ✅ After this call, TypeScript knows `mixedValue` is bigint
168
+ * const result: bigint = mixedValue; // ➔ Safe to use
169
+ * console.log(result + 100n);
170
+ * ```
171
+ */
172
+ declare const assertIsBigInt:(value:unknown,options?:OptionsAssertIs)=>asserts value is bigint;type OptionsAssertIsNumber=OptionsAssertIs & IsNumberOptions;
173
173
  /** -------------------------------------------------------
174
- * * ***Type guard assertion: `assertIsNumber`.***
175
- * -------------------------------------------------------
176
- * **This function is an **assertion function**.**
177
- * - Validates that the given `value` is a **number**.
178
- * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
179
- * - **Behavior:**
180
- * - ✅ If `value` is a `number` ➔ execution continues normally.
181
- * - ❌ If `value` is not a `number` ➔ throws a `TypeError` with either:
182
- * - A custom error message (`options.message`), or
183
- * - A default message including the actual type.
184
- * - **ℹ️ Note:**
185
- * - A `number` refers strictly to the JavaScript `number` primitive type (e.g., `42`, `3.14`, `-1`, `0`).
186
- * - This excludes `Number` objects created with `new Number(123)`.
187
- * - By default, `NaN` is **not considered** valid, you can allow it with `{ includeNaN: true }`.
188
- * @param {*} value - The value to validate.
189
- * @param {AssertIsNumberOptions|undefined} options - Optional configuration:
190
- * - `message`: A custom error message (`string` or `function`).
191
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
192
- * - `includeNaN`: Whether to treat `NaN` as valid.
193
- * @returns {boolean} Narrows `value` to `number` if no error is thrown.
194
- * @throws {TypeError} If the value is not a number (or is `NaN` when `includeNaN` is `false`).
195
- * @example
196
- * ```ts
197
- * // ✅ Simple usage
198
- * assertIsNumber(123);
199
- * // No error, value is number
200
- *
201
- * // ❌ Throws TypeError with default message
202
- * assertIsNumber("42");
203
- * // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `string`."
204
- *
205
- * // ❌ Throws with custom string message
206
- * assertIsNumber(true, { message: "Must be a number!" });
207
- * // ➔ TypeError: "Must be a number!"
208
- *
209
- * // ❌ Throws with custom function message + case formatting
210
- * assertIsNumber("hello", {
211
- * message: ({ currentType, validType }) =>
212
- * `Expected ${validType} but got (${currentType}).`,
213
- * formatCase: "toKebabCase"
214
- * });
215
- * // ➔ TypeError: "Expected number but got (string)."
216
- *
217
- * // ⚠️ NaN is invalid by default
218
- * assertIsNumber(NaN);
219
- * // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `NaN`."
220
- *
221
- * // ✅ Allow NaN explicitly
222
- * assertIsNumber(NaN, { includeNaN: true });
223
- * // No error
224
- * ```
225
- *
226
- * -------------------------------------------------------
227
- * ✅ ***Real-world usage example***:
228
- * ```ts
229
- * const mixedValue: string | number | undefined = getUserInput();
230
- *
231
- * // ❌ Throws if not number
232
- * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
233
- * assertIsNumber(mixedValue, { message: "Must be a number!" });
234
- *
235
- * // ✅ After this call, TypeScript knows `mixedValue` is number
236
- * const result: number = mixedValue; // ➔ Safe to use
237
- * console.log(result + 100);
238
- * ```
239
- */
240
- declare const assertIsNumber:(value:unknown,options?:AssertIsNumberOptions)=>asserts value is number;
174
+ * * ***Type guard assertion: `assertIsNumber`.***
175
+ * -------------------------------------------------------
176
+ * **This function is an **assertion function**.**
177
+ * - Validates that the given `value` is a **number**.
178
+ * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
179
+ * - **Behavior:**
180
+ * - ✅ If `value` is a `number` ➔ execution continues normally.
181
+ * - ❌ If `value` is not a `number` ➔ throws a `TypeError` with either:
182
+ * - A custom error message (`options.message`), or
183
+ * - A default message including the actual type.
184
+ * - **ℹ️ Note:**
185
+ * - A `number` refers strictly to the JavaScript `number` primitive type (e.g., `42`, `3.14`, `-1`, `0`).
186
+ * - This excludes `Number` objects created with `new Number(123)`.
187
+ * - By default, `NaN` is **not considered** valid, you can allow it with `{ includeNaN: true }`.
188
+ * @param {*} value - The value to validate.
189
+ * @param {OptionsAssertIsNumber} [options] - Optional configuration:
190
+ * - `message`: A custom error message (`string` or `function`).
191
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
192
+ * - `includeNaN`: Whether to treat `NaN` as valid.
193
+ * @returns {boolean} Narrows `value` to `number` if no error is thrown.
194
+ * @throws {TypeError} If the value is not a number (or is `NaN` when `includeNaN` is `false`).
195
+ * @example
196
+ * ```ts
197
+ * // ✅ Simple usage
198
+ * assertIsNumber(123);
199
+ * // No error, value is number
200
+ *
201
+ * // ❌ Throws TypeError with default message
202
+ * assertIsNumber("42");
203
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `string`."
204
+ *
205
+ * // ❌ Throws with custom string message
206
+ * assertIsNumber(true, { message: "Must be a number!" });
207
+ * // ➔ TypeError: "Must be a number!"
208
+ *
209
+ * // ❌ Throws with custom function message + case formatting
210
+ * assertIsNumber("hello", {
211
+ * message: ({ currentType, validType }) =>
212
+ * `Expected ${validType} but got (${currentType}).`,
213
+ * formatCase: "toKebabCase"
214
+ * });
215
+ * // ➔ TypeError: "Expected number but got (string)."
216
+ *
217
+ * // ⚠️ NaN is invalid by default
218
+ * assertIsNumber(NaN);
219
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `NaN`."
220
+ *
221
+ * // ✅ Allow NaN explicitly
222
+ * assertIsNumber(NaN, { includeNaN: true });
223
+ * // No error
224
+ * ```
225
+ *
226
+ * -------------------------------------------------------
227
+ * ✅ ***Real-world usage example***:
228
+ * ```ts
229
+ * const mixedValue: string | number | undefined = getUserInput();
230
+ *
231
+ * // ❌ Throws if not number
232
+ * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
233
+ * assertIsNumber(mixedValue, { message: "Must be a number!" });
234
+ *
235
+ * // ✅ After this call, TypeScript knows `mixedValue` is number
236
+ * const result: number = mixedValue; // ➔ Safe to use
237
+ * console.log(result + 100);
238
+ * ```
239
+ */
240
+ declare const assertIsNumber:(value:unknown,options?:OptionsAssertIsNumber)=>asserts value is number;
241
241
  /** -------------------------------------------------------
242
- * * ***Type guard assertion: `assertIsArray`.***
243
- * -------------------------------------------------------
244
- * **This function is an **assertion function**.**
245
- * - Validates that the given `value` is a **array**.
246
- * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
247
- * - **Behavior:**
248
- * - ✅ If `value` is an `array` ➔ execution continues normally.
249
- * - ❌ If `value` is not an `array` ➔ throws a `TypeError` with either:
250
- * - A custom error message (`options.message`), or
251
- * - A default message including the actual type.
252
- * @template T - The input type being asserted.
253
- * @param {*} value - The value to validate.
254
- * @param {AssertIsOptions|undefined} options - Optional configuration:
255
- * - `message`: A custom error message (`string` or `function`).
256
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
257
- * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
258
- * @throws {TypeError} If the value is not an array.
259
- * @example
260
- * ```ts
261
- * // ✅ Simple usage
262
- * assertIsArray([1, 2, 3]);
263
- * // No error, value is array
264
- *
265
- * // ❌ Throws TypeError with default message
266
- * assertIsArray({ a: 1 });
267
- * // ➔ TypeError: "Parameter input (`value`) must be of type `array`, but received: `plain-object`."
268
- *
269
- * // ❌ Throws with custom string message
270
- * assertIsArray(42, { message: "Must be an array!" });
271
- * // ➔ TypeError: "Must be an array!"
272
- *
273
- * // ❌ Throws with custom function message + case formatting
274
- * assertIsArray(42n, {
275
- * message: ({ currentType, validType }) =>
276
- * `Expected ${validType} but got (${currentType}).`,
277
- * formatCase: "toKebabCase"
278
- * });
279
- * // ➔ TypeError: "Expected array but got (big-int)."
280
- * ```
281
- *
282
- * -------------------------------------------------------
283
- * ✅ ***Real-world usage with generic narrowing***:
284
- * ```ts
285
- * const mixedValue: string | number[] | undefined = getUserInput();
286
- *
287
- * // ❌ Throws if not array
288
- * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
289
- * assertIsArray(mixedValue, { message: "Must be an array!" });
290
- *
291
- * // ✅ After this call, TypeScript knows `mixedValue` is narrowed to number[]
292
- * const result: number[] = mixedValue; // ➔ Safe to use
293
- * console.log(result.length);
294
- * ```
295
- */
296
- declare function assertIsArray<T extends unknown[]>(value:T,options?:AssertIsOptions):value is Extract<T,unknown[]>;declare function assertIsArray<T extends readonly unknown[]>(value:T,options?:AssertIsOptions):value is Extract<T,readonly unknown[]>;declare function assertIsArray(value:unknown,options?:AssertIsOptions):value is unknown[];
242
+ * * ***Type guard assertion: `assertIsArray`.***
243
+ * -------------------------------------------------------
244
+ * **This function is an **assertion function**.**
245
+ * - Validates that the given `value` is a **array**.
246
+ * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
247
+ * - **Behavior:**
248
+ * - ✅ If `value` is an `array` ➔ execution continues normally.
249
+ * - ❌ If `value` is not an `array` ➔ throws a `TypeError` with either:
250
+ * - A custom error message (`options.message`), or
251
+ * - A default message including the actual type.
252
+ * @template T - The input type being asserted.
253
+ * @param {*} value - The value to validate.
254
+ * @param {OptionsAssertIs} [options] - Optional configuration:
255
+ * - `message`: A custom error message (`string` or `function`).
256
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
257
+ * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
258
+ * @throws {TypeError} If the value is not an array.
259
+ * @example
260
+ * ```ts
261
+ * // ✅ Simple usage
262
+ * assertIsArray([1, 2, 3]);
263
+ * // No error, value is array
264
+ *
265
+ * // ❌ Throws TypeError with default message
266
+ * assertIsArray({ a: 1 });
267
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `array`, but received: `plain-object`."
268
+ *
269
+ * // ❌ Throws with custom string message
270
+ * assertIsArray(42, { message: "Must be an array!" });
271
+ * // ➔ TypeError: "Must be an array!"
272
+ *
273
+ * // ❌ Throws with custom function message + case formatting
274
+ * assertIsArray(42n, {
275
+ * message: ({ currentType, validType }) =>
276
+ * `Expected ${validType} but got (${currentType}).`,
277
+ * formatCase: "toKebabCase"
278
+ * });
279
+ * // ➔ TypeError: "Expected array but got (big-int)."
280
+ * ```
281
+ *
282
+ * -------------------------------------------------------
283
+ * ✅ ***Real-world usage with generic narrowing***:
284
+ * ```ts
285
+ * const mixedValue: string | number[] | undefined = getUserInput();
286
+ *
287
+ * // ❌ Throws if not array
288
+ * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
289
+ * assertIsArray(mixedValue, { message: "Must be an array!" });
290
+ *
291
+ * // ✅ After this call, TypeScript knows `mixedValue` is narrowed to number[]
292
+ * const result: number[] = mixedValue; // ➔ Safe to use
293
+ * console.log(result.length);
294
+ * ```
295
+ */
296
+ declare function assertIsArray<T extends unknown[]>(value:T,options?:OptionsAssertIs):value is Extract<T,unknown[]>;declare function assertIsArray<T extends readonly unknown[]>(value:T,options?:OptionsAssertIs):value is Extract<T,readonly unknown[]>;declare function assertIsArray(value:unknown,options?:OptionsAssertIs):value is unknown[];
297
297
  /** -------------------------------------------------------
298
- * * ***Type guard assertion: `assertIsPlainObject`.***
299
- * -------------------------------------------------------
300
- * **This function is an **assertion function**.**
301
- * - Validates that the given `value` is a **plain-object**.
302
- * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
303
- * - **Behavior:**
304
- * - ✅ If `value` is a `plain-object` ➔ execution continues normally.
305
- * - ❌ If `value` is not a `plain-object` ➔ throws a `TypeError` with either:
306
- * - A custom error message (`options.message`), or
307
- * - A default message including the actual type.
308
- * @template T - The input type being asserted.
309
- * @param {*} value - The value to validate.
310
- * @param {AssertIsOptions|undefined} options - Optional configuration:
311
- * - `message`: A custom error message (`string` or `function`).
312
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
313
- * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
314
- * @throws {TypeError} If `value` is not a `plain-object`.
315
- * @example
316
- * ```ts
317
- * // ✅ Simple usage
318
- * assertIsPlainObject({ a: 1, b: 2 });
319
- * // ➔ ok, value is plain object
320
- *
321
- * // ❌ Throws TypeError with default message
322
- * assertIsPlainObject([1, 2, 3]);
323
- * // ➔ TypeError: "Parameter input (`value`) must be of type `plain-object`, but received: `array`."
324
- *
325
- * // ❌ Throws with custom string message
326
- * assertIsPlainObject("hello", { message: "Must be plain object!" });
327
- * // ➔ TypeError: "Must be plain object!"
328
- *
329
- * // ❌ Throws with custom message function and formatCase
330
- * assertIsPlainObject(42n, {
331
- * message: ({ currentType, validType }) =>
332
- * `Expected ${validType} but got (${currentType}).`,
333
- * formatCase: "toKebabCase"
334
- * });
335
- * // ➔ TypeError: "Expected plain-object but got (big-int)."
336
- * ```
337
- * -------------------------------------------------------
338
- * ✅ ***Real-world usage with generic narrowing***:
339
- * ```ts
340
- * type User = { name: string; email: string };
341
- * const mixedValue: string | User | boolean | number | undefined = getUserInput();
342
- *
343
- * // Throws TypeError if not plain object
344
- * assertIsPlainObject(mixedValue, { message: "Must be plain object!" });
345
- *
346
- * // After this call, TypeScript knows `mixedValue` is narrowed to User
347
- * const user: User = mixedValue; // ➔ safe
348
- * console.log(user.email); // ➔ type-safe
349
- * ```
350
- */
351
- declare function assertIsPlainObject<T>(value:T,options?:AssertIsOptions):asserts value is IsPlainObjectResult<T>;
298
+ * * ***Type guard assertion: `assertIsPlainObject`.***
299
+ * -------------------------------------------------------
300
+ * **This function is an **assertion function**.**
301
+ * - Validates that the given `value` is a **plain-object**.
302
+ * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
303
+ * - **Behavior:**
304
+ * - ✅ If `value` is a `plain-object` ➔ execution continues normally.
305
+ * - ❌ If `value` is not a `plain-object` ➔ throws a `TypeError` with either:
306
+ * - A custom error message (`options.message`), or
307
+ * - A default message including the actual type.
308
+ * @template T - The input type being asserted.
309
+ * @param {*} value - The value to validate.
310
+ * @param {OptionsAssertIs} [options] - Optional configuration:
311
+ * - `message`: A custom error message (`string` or `function`).
312
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
313
+ * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
314
+ * @throws {TypeError} If `value` is not a `plain-object`.
315
+ * @example
316
+ * ```ts
317
+ * // ✅ Simple usage
318
+ * assertIsPlainObject({ a: 1, b: 2 });
319
+ * // ➔ ok, value is plain object
320
+ *
321
+ * // ❌ Throws TypeError with default message
322
+ * assertIsPlainObject([1, 2, 3]);
323
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `plain-object`, but received: `array`."
324
+ *
325
+ * // ❌ Throws with custom string message
326
+ * assertIsPlainObject("hello", { message: "Must be plain object!" });
327
+ * // ➔ TypeError: "Must be plain object!"
328
+ *
329
+ * // ❌ Throws with custom message function and formatCase
330
+ * assertIsPlainObject(42n, {
331
+ * message: ({ currentType, validType }) =>
332
+ * `Expected ${validType} but got (${currentType}).`,
333
+ * formatCase: "toKebabCase"
334
+ * });
335
+ * // ➔ TypeError: "Expected plain-object but got (big-int)."
336
+ * ```
337
+ * -------------------------------------------------------
338
+ * ✅ ***Real-world usage with generic narrowing***:
339
+ * ```ts
340
+ * type User = { name: string; email: string };
341
+ * const mixedValue: string | User | boolean | number | undefined = getUserInput();
342
+ *
343
+ * // Throws TypeError if not plain object
344
+ * assertIsPlainObject(mixedValue, { message: "Must be plain object!" });
345
+ *
346
+ * // After this call, TypeScript knows `mixedValue` is narrowed to User
347
+ * const user: User = mixedValue; // ➔ safe
348
+ * console.log(user.email); // ➔ type-safe
349
+ * ```
350
+ */
351
+ declare function assertIsPlainObject<T>(value:T,options?:OptionsAssertIs):asserts value is IsPlainObjectResult<T>;
352
352
  /** -------------------------------------------------------
353
- * * ***Type guard assertion: `assertIsString`.***
354
- * -------------------------------------------------------
355
- * **This function is an **assertion function**.**
356
- * - Validates that the given `value` is a **primitive-string**.
357
- * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
358
- * - **Behavior:**
359
- * - ✅ If `value` is a `primitive-string` ➔ execution continues normally.
360
- * - ❌ If `value` is not a `primitive-string` ➔ throws a `TypeError` with either:
361
- * - A custom error message (`options.message`), or
362
- * - A default message including the actual type.
363
- * - **ℹ️ Note:**
364
- * - A "string" refers strictly to a JavaScript `primitive-string` type (e.g., `"hello"`, `""`, `"123"`).
365
- * - This function excludes `String` objects created with `new String()`.
366
- * @param {*} value - The value to validate.
367
- * @param {AssertIsOptions|undefined} options - Optional configuration:
368
- * - `message`: A custom error message (`string` or `function`).
369
- * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
370
- * @returns {boolean} Narrows `value` to `string` if no error is thrown.
371
- * @throws {TypeError} If the value is not a string.
372
- * @example
373
- * ```ts
374
- * // ✅ Simple usage
375
- * assertIsString("hello");
376
- * // ➔ ✅ ok value is string, no error
377
- *
378
- * // ❌ Throws TypeError with default message
379
- * assertIsString(42);
380
- * // ➔ TypeError: "Parameter input (`value`) must be of type `string`, but received: `number`."
381
- *
382
- * // ❌ Throws with custom string message
383
- * assertIsString(42, { message: "Must be a string!" });
384
- * // ➔ TypeError: "Must be a string!"
385
- *
386
- * // ❌ Throws with custom message function and formatCase
387
- * assertIsString(42n, {
388
- * message: ({ currentType, validType }) => `Expected ${currentType} but got (${currentType}).`,
389
- * formatCase: "toKebabCase"
390
- * });
391
- * // ➔ TypeError: "Expected string but got (big-int)."
392
- * ```
393
- * -------------------------------------------------------
394
- * ✅ ***Real-world usage with generic narrowing***:
395
- * ```ts
396
- * type User = { name: string; email: string };
397
- * const mixedValue: string | User | undefined = getUserInput();
398
- *
399
- * // Throws TypeError if the value is not string
400
- * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
401
- * assertIsString(mixedValue, { message: "Must be a string!" });
402
- *
403
- * // After this call, TypeScript knows `mixedValue` is string
404
- * const result: string = mixedValue; // ➔ ✅ safe to use
405
- * console.log(result.toUpperCase()); // ➔ ✅ type-safe
406
- * ```
407
- */
408
- declare const assertIsString:(value:unknown,options?:AssertIsOptions)=>asserts value is string;export{assertIsArray,assertIsBigInt,assertIsBoolean,assertIsNumber,assertIsPlainObject,assertIsString};
353
+ * * ***Type guard assertion: `assertIsString`.***
354
+ * -------------------------------------------------------
355
+ * **This function is an **assertion function**.**
356
+ * - Validates that the given `value` is a **primitive-string**.
357
+ * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
358
+ * - **Behavior:**
359
+ * - ✅ If `value` is a `primitive-string` ➔ execution continues normally.
360
+ * - ❌ If `value` is not a `primitive-string` ➔ throws a `TypeError` with either:
361
+ * - A custom error message (`options.message`), or
362
+ * - A default message including the actual type.
363
+ * - **ℹ️ Note:**
364
+ * - A "string" refers strictly to a JavaScript `primitive-string` type (e.g., `"hello"`, `""`, `"123"`).
365
+ * - This function excludes `String` objects created with `new String()`.
366
+ * @param {*} value - The value to validate.
367
+ * @param {OptionsAssertIs} [options] - Optional configuration:
368
+ * - `message`: A custom error message (`string` or `function`).
369
+ * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
370
+ * @returns {boolean} Narrows `value` to `string` if no error is thrown.
371
+ * @throws {TypeError} If the value is not a string.
372
+ * @example
373
+ * ```ts
374
+ * // ✅ Simple usage
375
+ * assertIsString("hello");
376
+ * // ➔ ✅ ok value is string, no error
377
+ *
378
+ * // ❌ Throws TypeError with default message
379
+ * assertIsString(42);
380
+ * // ➔ TypeError: "Parameter input (`value`) must be of type `string`, but received: `number`."
381
+ *
382
+ * // ❌ Throws with custom string message
383
+ * assertIsString(42, { message: "Must be a string!" });
384
+ * // ➔ TypeError: "Must be a string!"
385
+ *
386
+ * // ❌ Throws with custom message function and formatCase
387
+ * assertIsString(42n, {
388
+ * message: ({ currentType, validType }) => `Expected ${currentType} but got (${currentType}).`,
389
+ * formatCase: "toKebabCase"
390
+ * });
391
+ * // ➔ TypeError: "Expected string but got (big-int)."
392
+ * ```
393
+ * -------------------------------------------------------
394
+ * ✅ ***Real-world usage with generic narrowing***:
395
+ * ```ts
396
+ * type User = { name: string; email: string };
397
+ * const mixedValue: string | User | undefined = getUserInput();
398
+ *
399
+ * // Throws TypeError if the value is not string
400
+ * // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
401
+ * assertIsString(mixedValue, { message: "Must be a string!" });
402
+ *
403
+ * // After this call, TypeScript knows `mixedValue` is string
404
+ * const result: string = mixedValue; // ➔ ✅ safe to use
405
+ * console.log(result.toUpperCase()); // ➔ ✅ type-safe
406
+ * ```
407
+ */
408
+ declare const assertIsString:(value:unknown,options?:OptionsAssertIs)=>asserts value is string;export{assertIsArray,assertIsBigInt,assertIsBoolean,assertIsNumber,assertIsPlainObject,assertIsString};