pangea-helpers 1.3.18 → 1.3.20

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.
@@ -1,6 +1,8 @@
1
1
  export type PartialDeep<T> = {
2
2
  [P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
3
3
  };
4
+ export type ExtractPrefixes<T, Separator extends string = '__'> = Extract<keyof T, `${string}${Separator}${string}`> extends `${infer P}${Separator}${string}` ? P : never;
5
+ export type ExtractSuffixes<T, P extends string, Separator extends string = '__'> = Extract<keyof T, `${P}${Separator}${string}`> extends `${P}${Separator}${infer S}` ? S : never;
4
6
  export type ExtractKeysWithoutSuffix<T, S extends string> = {
5
7
  [K in keyof T]: K extends `${infer Prefix}${S}` ? never : K;
6
8
  }[keyof T];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-helpers",
3
3
  "description": "",
4
- "version": "1.3.18",
4
+ "version": "1.3.20",
5
5
  "files": [
6
6
  "dist"
7
7
  ],