/** * Determine if {@linkcode input} matches the `"object"` type */ export function isObject(input: unknown): input is object { return typeof input === 'object' && !!input; } type Without = { [P in Exclude]?: never }; /** * Helper type for creating an exclusive union between two types * * @see {@link https://stackoverflow.com/a/53229567/2250435 | StackOverflow Post} */ export type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U;