@homedev/framework 0.0.3 → 0.0.4

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 (2) hide show
  1. package/dist/index.d.ts +0 -128
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -120,7 +120,6 @@ export declare interface SelectOptions {
120
120
 
121
121
  export { }
122
122
 
123
-
124
123
  /* Global declarations */
125
124
 
126
125
  declare global {
@@ -131,8 +130,6 @@ declare global {
131
130
  var defined: <T>(value: T | undefined | null, msg?: string) => T;
132
131
  }
133
132
 
134
-
135
-
136
133
  declare global {
137
134
  interface Array<T> {
138
135
  mapAsync<U>(callback: (value: T, index: number, array: T[]) => Promise<U>): Promise<U[]>;
@@ -155,9 +152,6 @@ declare global {
155
152
  }
156
153
  }
157
154
 
158
-
159
-
160
-
161
155
  declare global {
162
156
  interface ObjectConstructor {
163
157
  mapEntries<T extends object, U>(obj: T, callback: (key: keyof T, value: T[keyof T]) => [string | number | symbol, U]): Record<string | number | symbol, U>;
@@ -170,36 +164,6 @@ declare global {
170
164
  }
171
165
  }
172
166
 
173
- /**
174
- * Guards against undefined and null values.
175
- * Throws an error if the value is nullish, otherwise returns the value.
176
- *
177
- * @param value - The value to check
178
- * @param message - Custom error message (default: 'Value is undefined')
179
- * @returns The value if it is not nullish
180
- * @throws {Error} When value is undefined or null
181
- *
182
- * @example
183
- * ```typescript
184
- * const value = defined(maybeUndefined, 'Required value missing')
185
- * // value is guaranteed to be non-nullish here
186
- *
187
- * defined(0) // 0 (falsy but not nullish)
188
- * defined(false) // false (falsy but not nullish)
189
- * defined(null) // throws Error: Value is undefined
190
- * ```
191
- */
192
- /**
193
- * Re-export AsyncFunction constructor from async module.
194
- * Useful for dynamically creating async functions from source code strings.
195
- *
196
- * @example
197
- * ```typescript
198
- * const fn = new AsyncFunction('x', 'return x * 2')
199
- * await fn(5) // 10
200
- * ```
201
- */
202
-
203
167
  declare global {
204
168
  interface String {
205
169
  capitalize(): string;
@@ -219,95 +183,3 @@ declare global {
219
183
  }
220
184
  }
221
185
 
222
-
223
-
224
- /**
225
- * @public
226
- */
227
- key: string;
228
- value: any;
229
- path: string[];
230
- parent: any;
231
- parents: any[];
232
- }
233
- /**
234
- * @public
235
- */
236
- Explore = 0,
237
- SkipSiblings = 1,
238
- NoExplore = 2,
239
- ReplaceParent = 3,
240
- DeleteParent = 4,
241
- MergeParent = 5,
242
- ReplaceItem = 6,
243
- DeleteItem = 7
244
- }
245
- /**
246
- * @public
247
- */
248
- /**
249
- * @public
250
- */
251
- readonly action: NavigateAction;
252
- by?: any | undefined;
253
- skipSiblings?: boolean | undefined;
254
- reexplore?: boolean | undefined;
255
- constructor(action: NavigateAction, by?: any | undefined, skipSiblings?: boolean | undefined, reexplore?: boolean | undefined);
256
- private static readonly _explore;
257
- private static readonly _noExplore;
258
- private static readonly _skipSiblings;
259
- private static readonly _deleteParent;
260
- static ReplaceParent(by: any, reexplore?: boolean): NavigateResult;
261
- static SkipSiblings(): NavigateResult;
262
- static Explore(): NavigateResult;
263
- static NoExplore(): NavigateResult;
264
- static DeleteParent(): NavigateResult;
265
- static MergeParent(by: any): NavigateResult;
266
- static ReplaceItem(by: any, skipSiblings?: boolean): NavigateResult;
267
- static DeleteItem(skipSiblings?: boolean): NavigateResult;
268
- }
269
-
270
-
271
- /**
272
- * @public
273
- */
274
- /**
275
- * @public
276
- */
277
- conflict?: (key: string, source: any, target: any, sourceContainer: any, targetContainer: any) => any;
278
- mismatch?: (key: string, source: any, target: any, sourceContainer: any, targetContainer: any) => any;
279
- navigate?: (key: string, source: any, target: any, sourceContainer: any, targetContainer: any) => boolean | undefined;
280
- mode?: (key: string, source: any, target: any, sourceContainer: any, targetContainer: any) => MergeMode | void;
281
- }
282
-
283
-
284
- /**
285
- * Options for configuring the select function behavior
286
- * @public
287
- */
288
- /** Value to set at the selected path */
289
- set?: any;
290
- /** Alternative key to use (currently unused) */
291
- key?: string;
292
- /** Path separator character (default: '.') */
293
- separator?: string;
294
- /** Default value to return when path is not found */
295
- defaultValue?: any;
296
- /** If true, returns undefined instead of throwing on missing paths */
297
- optional?: boolean;
298
- }
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homedev/framework",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "homedev framework",
5
5
  "author": "julzor",
6
6
  "license": "ISC",