(record: APIRecord)
| 53 | } |
| 54 | |
| 55 | registerAPI(record: APIRecord) { |
| 56 | if (record.name in this.#apis) |
| 57 | throw new Error(`API with name "${record.name}" has already been registered.`); |
| 58 | this.#apis[record.name] = record; |
| 59 | this.saveConfig(); |
| 60 | } |
| 61 | |
| 62 | unregisterAPI(name: string) { |
| 63 | if (!(name in this.#apis)) |