let customElId = 0;

export function customElName() {
	++customElId;
	return `x-${customElId}`;
}

declare global {
	interface Window {
		ShadowRoot: any;
	}
}

let customElId = 0;

export function customElName() {
	++customElId;
	return `x-${customElId}`;
}

--- 
+++ 
@@ -4,3 +4,9 @@
 	++customElId;
 	return `x-${customElId}`;
 }
+
+declare global {
+	interface Window {
+		ShadowRoot: any;
+	}
+}
Add global ShadowRoot declaration on Window
