Skip to main content

foundation-utils.noop

Home > @genesislcap/foundation-utils > noop

noop() function​

A no-operation function that executes an optional callback.

This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using avoidTreeShaking() which provides a more explicit API.

Signature:

noop: (fn?: () => void) => void

Parameters​

Parameter

Type

Description

fn

() => void

(Optional)

Returns:

void