pangea-helpers 1.3.20 → 1.3.22
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.
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +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,
|
|
5
|
-
export type ExtractSuffixes<T, P extends string,
|
|
4
|
+
export type ExtractPrefixes<T, Sep extends string = '__'> = keyof T extends `${infer P}${Sep}${string}` ? P : never;
|
|
5
|
+
export type ExtractSuffixes<T, P extends string, Sep extends string = '__'> = keyof T extends `${P}${Sep}${infer Suffix}` ? Suffix : never;
|
|
6
6
|
export type ExtractKeysWithoutSuffix<T, S extends string> = {
|
|
7
7
|
[K in keyof T]: K extends `${infer Prefix}${S}` ? never : K;
|
|
8
8
|
}[keyof T];
|