@hot-updater/core 0.5.10 → 0.6.1-rc.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.
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -37,6 +37,11 @@ export interface Bundle {
|
|
|
37
37
|
*/
|
|
38
38
|
message: string | null;
|
|
39
39
|
}
|
|
40
|
+
type SnakeCase<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}` : S;
|
|
41
|
+
type SnakeKeyObject<T> = T extends Record<string, any> ? {
|
|
42
|
+
[K in keyof T as SnakeCase<Extract<K, string>>]: T[K] extends object ? SnakeKeyObject<T[K]> : T[K];
|
|
43
|
+
} : T;
|
|
44
|
+
export type SnakeCaseBundle = SnakeKeyObject<Bundle>;
|
|
40
45
|
export type BundleArg = string | Bundle[] | (() => Promise<Bundle[]>) | (() => Bundle[]);
|
|
41
46
|
export type UpdateStatus = "ROLLBACK" | "UPDATE";
|
|
42
47
|
export interface UpdateInfo {
|
|
@@ -51,3 +56,4 @@ export interface GetBundlesArgs {
|
|
|
51
56
|
bundleId: string;
|
|
52
57
|
appVersion: string;
|
|
53
58
|
}
|
|
59
|
+
export {};
|