src/vs/platform/terminal/common/terminalProfiles.ts/terminalIconsEqual
export function terminalIconsEqual(a?: TerminalIcon, b?: TerminalIcon): boolean {
	if (!a && !b) {
		return true;
	} else if (!a || !b) {
		return false;
	}

	if (ThemeIcon.isThemeIcon(a) && ThemeIcon.isThemeIcon(b)) {
		return a.id === b.id && a.color === b.color;
	}
	if (typeof a === 'object' && 'light' in a && 'dark' in a
		&& typeof b === 'object' && 'light' in b && 'dark' in b) {
		const castedA = (a as { light: unknown; dark: unknown });
		const castedB = (b as { light: unknown; dark: unknown });
		if ((URI.isUri(castedA.light) || isUriComponents(castedA.light)) && (URI.isUri(castedA.dark) || isUriComponents(castedA.dark))
			&& (URI.isUri(castedB.light) || isUriComponents(castedB.light)) && (URI.isUri(castedB.dark) || isUriComponents(castedB.dark))) {
			return castedA.light.path === castedB.light.path && castedA.dark.path === castedB.dark.path;
		}
	}
	if ((URI.isUri(a) && URI.isUri(b)) || (isUriComponents(a) || isUriComponents(b))) {
		const castedA = (a as { scheme: unknown; path: unknown });
		const castedB = (b as { scheme: unknown; path: unknown });
		return castedA.path === castedB.path && castedA.scheme === castedB.scheme;
	}

	return false;
}