@nu-art/ts-common 0.203.109 → 0.203.111

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.
@@ -10,7 +10,7 @@ export declare class CSVModuleV3_Class extends Module {
10
10
  readFromStream: <T>(stream: Readable, processor: (item: T, rowNumber: number, stream: csv.CsvParserStream<csv.ParserRow<any>, csv.ParserRow<any>>) => void) => Promise<void>;
11
11
  protected readImpl: <T>(stream: Readable, processor: (item: T, rowNumber: number, stream: csv.CsvParserStream<csv.ParserRow<any>, csv.ParserRow<any>>) => void) => Promise<void>;
12
12
  writeToStream: <I extends csv.FormatterRow = csv.FormatterRow, O extends csv.FormatterRow = csv.FormatterRow>(writable: Writable, items: I[], options?: csv.FormatterOptionsArgs<I, O> | undefined) => Promise<void>;
13
- protected writeImpl: <I extends unknown>(writable: Writable, items: I[], options?: csv.FormatterOptionsArgs<any, any>) => Promise<void>;
13
+ protected writeImpl: <I>(writable: Writable, items: I[], options?: csv.FormatterOptionsArgs<any, any>) => Promise<void>;
14
14
  provideFormatter: (transformer?: (item: any) => any) => csv.CsvFormatterStream<csv.FormatterRow, csv.FormatterRow>;
15
15
  provideFormatterFromCsv: (transformer?: (item: any) => any) => csv.CsvParserStream<csv.ParserRow<any>, csv.ParserRow<any>>;
16
16
  fromString: (str: string) => Promise<any[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/ts-common",
3
- "version": "0.203.109",
3
+ "version": "0.203.111",
4
4
  "description": "js and ts infra",
5
5
  "keywords": [
6
6
  "TacB0sS",
package/utils/types.d.ts CHANGED
@@ -189,10 +189,9 @@ export type RecursiveWritable<T> = T extends ReadonlyArray<infer R> ? RecursiveW
189
189
  * type Profile = { name: string; contacts: { email: { primary: string; secondary: string } } };
190
190
  * type ProfilePaths = DotNotation<Profile>; // 'name' | 'contacts' | 'contacts.email' | 'contacts.email.primary' | 'contacts.email.secondary'
191
191
  */
192
- type NonEmptyObject<T> = T extends object ? (keyof T extends never ? never : T) : never;
193
- export type DotNotation<T extends object> = NonNullable<T extends object ? {
194
- [K in keyof T]: K extends string ? T[K] extends object ? NonEmptyObject<T[K]> extends never ? T[K] extends string | string[] ? `${K & string}` : never : `${K & string}.${DotNotation<T[K]>}` : `${K & string}` : never;
195
- }[keyof T] : ''>;
192
+ export type DotNotation<T extends object> = {
193
+ [K in keyof T]-?: K extends string ? NonNullable<T[K]> extends string | string[] ? K : NonNullable<T[K]> extends object ? `${K}.${DotNotation<NonNullable<T[K]>>}` : never : never;
194
+ }[keyof T];
196
195
  /**
197
196
  * Replaces the type of nested property within an object, based on a specified path.
198
197
  *
@@ -239,4 +238,3 @@ export type WithRequired<T, K extends keyof T> = T & {
239
238
  [P in K]-?: T[P];
240
239
  };
241
240
  export type AsyncVoidFunction = () => Promise<void>;
242
- export {};