diff --git a/libs/util/src/lib/component/with-component-ref.ts b/libs/util/src/lib/component/with-component-ref.ts index ea521d2..581e6e1 100644 --- a/libs/util/src/lib/component/with-component-ref.ts +++ b/libs/util/src/lib/component/with-component-ref.ts @@ -1,17 +1,12 @@ import { ComponentRef } from '@angular/core'; /** - * Type-safely assign values to your ComponentRef's @Input decorated properties. - * You can also chain input assignments - * - * @example - * setComponentRefInput(componenRef).setInput(key, value).setInput(key, value)... + * Type-safely assign values to your ComponentRef's @Input decorated properties. */ -export function withComponentRef(ref: ComponentRef) { - const setInput = (key: K, value: T[K]) => { - ref.setInput(key, value); - return { setInput }; - }; - - return { setInput }; +export function setComponentRefInput( + ref: ComponentRef, + key: K, + value: T[K] +): void { + ref.setInput(key, value); }