tweaks type
This commit is contained in:
parent
6453dae433
commit
bf13a8b524
|
@ -148,10 +148,7 @@ class DatasetPersistence {
|
|||
});
|
||||
}
|
||||
|
||||
static assertConfigured(input: Config): asserts input is Config & {
|
||||
hfDatasetRepoUrl: string;
|
||||
hfPrivateSshKey: string;
|
||||
} {
|
||||
static assertConfigured(input: Config): asserts input is ConfigWithDatasets {
|
||||
if (!input.hfDatasetRepoUrl) {
|
||||
throw new Error("HF_DATASET_REPO_URL is required when using Datasets.");
|
||||
}
|
||||
|
@ -162,4 +159,9 @@ class DatasetPersistence {
|
|||
}
|
||||
}
|
||||
|
||||
type ConfigWithDatasets = Config & {
|
||||
hfDatasetRepoUrl: string;
|
||||
hfPrivateSshKey: string;
|
||||
};
|
||||
|
||||
export { DatasetPersistence };
|
||||
|
|
Loading…
Reference in New Issue