fix the types

This commit is contained in:
J H
2024-01-30 16:28:40 -07:00
parent cbded5f4e9
commit 01ad2421b4
8 changed files with 24 additions and 50 deletions

View File

@@ -4,14 +4,14 @@ import { ExpectedExports } from "../types"
import { _ } from "../util"
export type SetupBackupsParams<M extends SDKManifest> = Array<
(keyof M["volumes"] & string) | Backups<M>
M["volumes"][0] | Backups<M>
>
export function setupBackups<M extends SDKManifest>(
...args: _<SetupBackupsParams<M>>
) {
const backups = Array<Backups<M>>()
const volumes = new Set<keyof M["volumes"] & string>()
const volumes = new Set<M["volumes"][0]>()
for (const arg of args) {
if (arg instanceof Backups) {
backups.push(arg)