feat: update some shit

This commit is contained in:
2023-10-16 01:40:10 +02:00
parent 799a736f36
commit 03d17569da
10 changed files with 336 additions and 191 deletions

View File

@@ -0,0 +1,11 @@
// deno-lint-ignore no-explicit-any
export function withSubComponents<A, B extends Record<string, any>>(
component: A,
subcomponents: B,
): A & B {
Object.keys(subcomponents).forEach((key) => {
// deno-lint-ignore no-explicit-any
(component as any)[key] = (subcomponents as any)[key];
});
return component as A & B;
}