(file: string, message: string)
| 149 | } |
| 150 | |
| 151 | const setLoadError = (file: string, message: string) => { |
| 152 | setStore( |
| 153 | "file", |
| 154 | file, |
| 155 | produce((draft) => { |
| 156 | draft.loading = false |
| 157 | draft.error = message |
| 158 | }), |
| 159 | ) |
| 160 | showToast({ |
| 161 | variant: "error", |
| 162 | title: language.t("toast.file.loadFailed.title"), |
| 163 | description: message, |
| 164 | }) |
| 165 | } |
| 166 | |
| 167 | const load = (input: string, options?: { force?: boolean }) => { |
| 168 | const file = path.normalize(input) |
no test coverage detected