diff --git a/libs/state/actions/src/lib/transforms.ts b/libs/state/actions/src/lib/transforms.ts index 1436961655..ac413df9fa 100644 --- a/libs/state/actions/src/lib/transforms.ts +++ b/libs/state/actions/src/lib/transforms.ts @@ -1,7 +1,6 @@ /** * @description * This transform is a side effecting operation applying `preventDefault` to a passed Event - * @param e */ export function preventDefault(e: Event): Event { e.preventDefault(); @@ -11,7 +10,6 @@ export function preventDefault(e: Event): Event { /** * @description * This transform is a side effecting operation applying `stopPropagation` to a passed Event - * @param e */ export function stopPropagation(e: Event): Event { e.stopPropagation(); @@ -21,7 +19,6 @@ export function stopPropagation(e: Event): Event { /** * @description * This transform is a side effecting operation applying `preventDefault` and `stopPropagation` to a passed Event - * @param e */ export function preventDefaultStopPropagation(e: Event): Event { e.stopPropagation(); @@ -29,16 +26,23 @@ export function preventDefaultStopPropagation(e: Event): Event { return e; } - /** * @description - * This transform is helps to pluck values from DOM `Event` or forward the value directly. - * @param e + * This transform helps to pluck values from DOM `Event` or forward the value directly. */ export function eventValue(e: Event | T): T { // Consider https://stackoverflow.com/questions/1458894/how-to-determine-if-javascript-object-is-an-event - if((e as unknown as {target: {value: T}})?.target) { - return (e as unknown as {target: {value: T}})?.target?.value; + if ((e as unknown as { target: { value: T } })?.target) { + return (e as unknown as { target: { value: T } })?.target?.value; } return e as T; } + +/** + * @description + * This transform helps to void all arguments. + */ +export function toVoid(_?: unknown): void { + _; + return void 0; +}