diff --git a/server/@types/pingdom.d.ts b/server/@types/pingdom.d.ts index ebe48680..8291e33b 100644 --- a/server/@types/pingdom.d.ts +++ b/server/@types/pingdom.d.ts @@ -9,7 +9,7 @@ type WithRequired = T & { [P in K]-?: T[P] } /** OneOf type helpers */ type Without = { [P in Exclude]?: never } type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U -type OneOf = T extends [infer Only] +type OneOf[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> diff --git a/server/services/pingdomService.ts b/server/services/pingdomService.ts index 375ddd1b..21275165 100644 --- a/server/services/pingdomService.ts +++ b/server/services/pingdomService.ts @@ -1,5 +1,5 @@ import type { PingdomApiClient, RestClientBuilder } from '../data' -import { Check, Checks } from '../data/pingdomApiTypes' +import { Checks } from '../data/pingdomApiTypes' export default class PingdomService { constructor(private readonly pingdomApiClientFactory: RestClientBuilder) {}