import ICAL from "ical.js";

export function isRecur(val: unknown): val is ICAL.Recur {
	return typeof val === "object" && val instanceof ICAL.Recur;
}

export function isTime(val: unknown): val is ICAL.Time {
	return typeof val === "object" && val instanceof ICAL.Time;
}

// export function isGeo(val: unknown): val is ICAL.Geo {
// 	return typeof val === "object" && val instanceof ICAL.Geo;
// }

export function isUtcOffset(val: unknown): val is ICAL.UtcOffset {
	return typeof val === "object" && val instanceof ICAL.UtcOffset;
}

export function isBinary(val: unknown): val is ICAL.Binary {
	return typeof val === "object" && val instanceof ICAL.Binary;
}

export function isDuration(val: unknown): val is ICAL.Duration {
	return typeof val === "object" && val instanceof ICAL.Duration;
}

export function isPeriod(val: unknown): val is ICAL.Period {
	return typeof val === "object" && val instanceof ICAL.Period;
}
